Skip to content

Commit 75c556a

Browse files
committed
removed bgColor property for NavigationDrawerDestination as it doesn't work in flutter
flutter/flutter#138105
1 parent 977eb72 commit 75c556a

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

‎package/lib/src/controls/navigation_drawer.dart‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ class _NavigationDrawerControlState extends State<NavigationDrawerControl> {
8282
var iconContentCtrls =
8383
destView.children.where((c) => c.name == "icon_content");
8484
return NavigationDrawerDestination(
85+
// backgroundColor: HexColor.fromString(Theme.of(context),
86+
// destView.control.attrString("bgColor", "")!),
87+
8588
icon: iconContentCtrls.isNotEmpty
8689
? createControl(
8790
destView.control, iconContentCtrls.first.id, disabled)
8891
: Icon(icon),
89-
label: Text('Text'),
92+
label: Text('Text2'),
9093
);
9194
} else {
9295
return createControl(

‎sdk/python/packages/flet-core/src/flet_core/navigation_drawer.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def show_end_drawer(e):
7575
def __init__(
7676
self,
7777
ref: Optional[Ref] = None,
78-
bgcolor: Optional[str] = None,
78+
# bgcolor: Optional[str] = None,
7979
icon: Optional[str] = None,
8080
icon_content: Optional[Control] = None,
8181
label: Optional[str] = None,
@@ -84,7 +84,7 @@ def __init__(
8484
):
8585
Control.__init__(self, ref=ref)
8686
self.label = label
87-
self.bgcolor = bgcolor
87+
# self.bgcolor = bgcolor
8888
self.icon = icon
8989
self.__icon_content: Optional[Control] = None
9090
self.icon_content = icon_content
@@ -107,14 +107,14 @@ def _get_children(self):
107107
children.append(self.__selected_icon_content)
108108
return children
109109

110-
# bgcolor
111-
@property
112-
def bgcolor(self):
113-
return self._get_attr("bgColor")
110+
# # bgcolor
111+
# @property
112+
# def bgcolor(self):
113+
# return self._get_attr("bgColor")
114114

115-
@bgcolor.setter
116-
def bgcolor(self, value):
117-
self._set_attr("bgColor", value)
115+
# @bgcolor.setter
116+
# def bgcolor(self, value):
117+
# self._set_attr("bgColor", value)
118118

119119
# icon
120120
@property

0 commit comments

Comments
 (0)