@@ -32,14 +32,25 @@ Tooltip? parseTooltip(dynamic value, BuildContext context, Widget widget) {
3232
3333 /// The tooltip shape defaults to a rounded rectangle with a border radius of
3434 /// 4.0. Tooltips will also default to an opacity of 90%
35+ var defaultDecoration = BoxDecoration (
36+ borderRadius: BorderRadius .circular (4.0 ),
37+ color: parseColor (
38+ value["bgcolor" ],
39+ theme,
40+ theme.brightness == Brightness .light
41+ ? Colors .grey[700 ]
42+ : Colors .white));
3543 var decoration = parseBoxDecoration (value["decoration" ], context);
36- decoration? .copyWith (
37- color: parseColor (
38- value["bgcolor" ],
39- theme,
40- theme.brightness == Brightness .light
41- ? Colors .grey[700 ]
42- : Colors .white)! );
44+ var finalDecoration = defaultDecoration.copyWith (
45+ color: decoration? .color,
46+ borderRadius: decoration? .borderRadius,
47+ border: decoration? .border,
48+ boxShadow: decoration? .boxShadow,
49+ gradient: decoration? .gradient,
50+ image: decoration? .image,
51+ shape: decoration? .shape,
52+ backgroundBlendMode: decoration? .backgroundBlendMode,
53+ );
4354 return Tooltip (
4455 message: value["message" ],
4556 enableFeedback: parseBool (value["enable_feedback" ]),
@@ -49,7 +60,7 @@ Tooltip? parseTooltip(dynamic value, BuildContext context, Widget widget) {
4960 exitDuration: parseDuration (value["exit_duration" ]),
5061 preferBelow: parseBool (value["prefer_below" ]),
5162 padding: parseEdgeInsets (value["padding" ]),
52- decoration: decoration ,
63+ decoration: finalDecoration ,
5364 textStyle: parseTextStyle (value["text_style" ], theme),
5465 verticalOffset: parseDouble (value["vertical_offset" ]),
5566 margin: parseEdgeInsets (value["margin" ]),
0 commit comments