@@ -16,38 +16,36 @@ import 'theme.dart';
16
16
17
17
/// Emoji-reaction styles that differ between light and dark themes.
18
18
class EmojiReactionTheme extends ThemeExtension <EmojiReactionTheme > {
19
- EmojiReactionTheme .light () :
20
- this ._(
21
- bgSelected: Colors .white,
22
-
23
- // TODO shadow effect, following web, which uses `box-shadow: inset`:
24
- // https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#inset
25
- // Needs Flutter support for something like that:
26
- // https://github.com/flutter/flutter/issues/18636
27
- // https://github.com/flutter/flutter/issues/52999
28
- // Until then use a solid color; a much-lightened version of the shadow color.
29
- // Also adapt by making [borderUnselected] more transparent, so we'll
30
- // want to check that against web when implementing the shadow.
31
- bgUnselected: const HSLColor .fromAHSL (0.08 , 210 , 0.50 , 0.875 ).toColor (),
32
-
33
- borderSelected: Colors .black.withValues (alpha: 0.45 ),
34
-
35
- // TODO see TODO on [bgUnselected] about shadow effect
36
- borderUnselected: Colors .black.withValues (alpha: 0.05 ),
37
-
38
- textSelected: const HSLColor .fromAHSL (1 , 210 , 0.20 , 0.20 ).toColor (),
39
- textUnselected: const HSLColor .fromAHSL (1 , 210 , 0.20 , 0.25 ).toColor (),
40
- );
41
-
42
- EmojiReactionTheme .dark () :
43
- this ._(
44
- bgSelected: Colors .black.withValues (alpha: 0.8 ),
45
- bgUnselected: Colors .black.withValues (alpha: 0.3 ),
46
- borderSelected: Colors .white.withValues (alpha: 0.75 ),
47
- borderUnselected: Colors .white.withValues (alpha: 0.15 ),
48
- textSelected: Colors .white.withValues (alpha: 0.85 ),
49
- textUnselected: Colors .white.withValues (alpha: 0.75 ),
50
- );
19
+ static final light = EmojiReactionTheme ._(
20
+ bgSelected: Colors .white,
21
+
22
+ // TODO shadow effect, following web, which uses `box-shadow: inset`:
23
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#inset
24
+ // Needs Flutter support for something like that:
25
+ // https://github.com/flutter/flutter/issues/18636
26
+ // https://github.com/flutter/flutter/issues/52999
27
+ // Until then use a solid color; a much-lightened version of the shadow color.
28
+ // Also adapt by making [borderUnselected] more transparent, so we'll
29
+ // want to check that against web when implementing the shadow.
30
+ bgUnselected: const HSLColor .fromAHSL (0.08 , 210 , 0.50 , 0.875 ).toColor (),
31
+
32
+ borderSelected: Colors .black.withValues (alpha: 0.45 ),
33
+
34
+ // TODO see TODO on [bgUnselected] about shadow effect
35
+ borderUnselected: Colors .black.withValues (alpha: 0.05 ),
36
+
37
+ textSelected: const HSLColor .fromAHSL (1 , 210 , 0.20 , 0.20 ).toColor (),
38
+ textUnselected: const HSLColor .fromAHSL (1 , 210 , 0.20 , 0.25 ).toColor (),
39
+ );
40
+
41
+ static final dark = EmojiReactionTheme ._(
42
+ bgSelected: Colors .black.withValues (alpha: 0.8 ),
43
+ bgUnselected: Colors .black.withValues (alpha: 0.3 ),
44
+ borderSelected: Colors .white.withValues (alpha: 0.75 ),
45
+ borderUnselected: Colors .white.withValues (alpha: 0.15 ),
46
+ textSelected: Colors .white.withValues (alpha: 0.85 ),
47
+ textUnselected: Colors .white.withValues (alpha: 0.75 ),
48
+ );
51
49
52
50
EmojiReactionTheme ._({
53
51
required this .bgSelected,
0 commit comments