This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad81c63
commit c624e55
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
13 changes: 11 additions & 2 deletions
13
lib/design_system/foundation/colors/internal_gradient.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import 'package:concordium_wallet/design_system/foundation/colors/internal_color.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
/// These are 'primitive' gradients that should never be referenced directly from code. | ||
/// They are only meant to be used internally by the semantic gradient tokens | ||
class InternalGradient { | ||
static const disable = LinearGradient(begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [Color(0xFFCCCCCC), Color(0xFFE5E5E5)]); | ||
} | ||
static Gradient disable = _buildGradient(colors: const [InternalColor.black20, InternalColor.black10]); | ||
|
||
// TODO(RHA): Is it intentional that the end color is missing? | ||
static Gradient darkMineral = _buildGradient(colors: const [InternalColor.oceanBlue, Color(0xFF2E8894)]); | ||
static Gradient lightMode = _buildGradient(colors: const [InternalColor.black05, InternalColor.white]); | ||
static Gradient lightBlue = _buildGradient(colors: const []); | ||
|
||
static Gradient _buildGradient({required List<Color> colors}) => | ||
LinearGradient(begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [colors.first, colors.last]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters