fix combox theme

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-03-01 19:31:52 +08:00
parent 556daeea71
commit 6267d56b45
2 changed files with 15 additions and 3 deletions

View File

@@ -109,27 +109,32 @@ class IconFont {
class ColorThemeExtension extends ThemeExtension<ColorThemeExtension> {
const ColorThemeExtension({
required this.border,
required this.border2,
required this.highlight,
});
final Color? border;
final Color? border2;
final Color? highlight;
static const light = ColorThemeExtension(
border: Color(0xFFCCCCCC),
border2: Color(0xFFBBBBBB),
highlight: Color(0xFFE5E5E5),
);
static const dark = ColorThemeExtension(
border: Color(0xFF555555),
border2: Color(0xFFE5E5E5),
highlight: Color(0xFF3F3F3F),
);
@override
ThemeExtension<ColorThemeExtension> copyWith(
{Color? border, Color? highlight}) {
{Color? border, Color? border2, Color? highlight}) {
return ColorThemeExtension(
border: border ?? this.border,
border2: border2 ?? this.border2,
highlight: highlight ?? this.highlight,
);
}
@@ -142,6 +147,7 @@ class ColorThemeExtension extends ThemeExtension<ColorThemeExtension> {
}
return ColorThemeExtension(
border: Color.lerp(border, other.border, t),
border2: Color.lerp(border2, other.border2, t),
highlight: Color.lerp(highlight, other.highlight, t),
);
}