File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ class _SnackBarControlState extends State<SnackBarControl> {
43
43
SnackBarAction ? action = actionName != ""
44
44
? SnackBarAction (
45
45
label: actionName,
46
+ textColor: HexColor .fromString (Theme .of (context),
47
+ widget.control.attrString ("actionColor" , "" )! ),
46
48
onPressed: () {
47
49
debugPrint ("SnackBar ${widget .control .id } clicked!" );
48
50
FletAppServices .of (context).ws.pageEventFromWeb (
Original file line number Diff line number Diff line change 9
9
class SnackBar (Control ):
10
10
def __init__ (
11
11
self ,
12
- content : Optional [ Control ] = None ,
12
+ content : Control ,
13
13
ref : Optional [Ref ] = None ,
14
14
disabled : Optional [bool ] = None ,
15
15
visible : Optional [bool ] = None ,
@@ -20,6 +20,7 @@ def __init__(
20
20
open : bool = False ,
21
21
# remove_current_snackbar: bool = False,
22
22
action : Optional [str ] = None ,
23
+ action_color : Optional [str ] = None ,
23
24
bgcolor : Optional [str ] = None ,
24
25
on_action = None ,
25
26
):
@@ -36,6 +37,7 @@ def __init__(
36
37
# self.remove_current_snackbar = remove_current_snackbar
37
38
self .content = content
38
39
self .action = action
40
+ self .action_color = action_color
39
41
self .bgcolor = bgcolor
40
42
self .on_action = on_action
41
43
@@ -90,6 +92,15 @@ def action(self):
90
92
def action (self , value ):
91
93
self ._set_attr ("action" , value )
92
94
95
+ # action_color
96
+ @property
97
+ def action_color (self ):
98
+ return self ._get_attr ("actionColor" )
99
+
100
+ @action_color .setter
101
+ def action_color (self , value ):
102
+ self ._set_attr ("actionColor" , value )
103
+
93
104
# bgcolor
94
105
@property
95
106
def bgcolor (self ):
You can’t perform that action at this time.
0 commit comments