diff --git a/package/lib/src/controls/bottom_sheet.dart b/package/lib/src/controls/bottom_sheet.dart index 78cb3a285..2e0fa32dd 100644 --- a/package/lib/src/controls/bottom_sheet.dart +++ b/package/lib/src/controls/bottom_sheet.dart @@ -55,6 +55,8 @@ class _BottomSheetControlState extends State { var enableDrag = widget.control.attrBool("enableDrag", false)!; var showDragHandle = widget.control.attrBool("showDragHandle", false)!; var useSafeArea = widget.control.attrBool("useSafeArea", true)!; + var isScrollControlled = + widget.control.attrBool("isScrollControlled", false)!; void resetOpenState() { List> props = [ @@ -80,6 +82,7 @@ class _BottomSheetControlState extends State { return bottomSheet; }, isDismissible: dismissible, + isScrollControlled: isScrollControlled, enableDrag: enableDrag, showDragHandle: showDragHandle, useSafeArea: useSafeArea) diff --git a/sdk/python/packages/flet-core/src/flet_core/bottom_sheet.py b/sdk/python/packages/flet-core/src/flet_core/bottom_sheet.py index 77cd97259..a69fb3676 100644 --- a/sdk/python/packages/flet-core/src/flet_core/bottom_sheet.py +++ b/sdk/python/packages/flet-core/src/flet_core/bottom_sheet.py @@ -64,6 +64,7 @@ def __init__( enable_drag: Optional[bool] = None, show_drag_handle: Optional[bool] = None, use_safe_area: Optional[bool] = None, + is_scroll_controlled: Optional[bool] = None, on_dismiss=None, ): Control.__init__( @@ -74,15 +75,14 @@ def __init__( data=data, ) - self.__title: Optional[Control] = None self.__content: Optional[Control] = None - self.__actions: List[Control] = [] self.open = open self.dismissible = dismissible self.enable_drag = enable_drag self.show_drag_handle = show_drag_handle self.use_safe_area = use_safe_area + self.is_scroll_controlled = is_scroll_controlled self.content = content self.on_dismiss = on_dismiss @@ -141,6 +141,15 @@ def use_safe_area(self) -> Optional[bool]: def use_safe_area(self, value: Optional[bool]): self._set_attr("useSafeArea", value) + # is_scroll_controlled + @property + def is_scroll_controlled(self) -> Optional[bool]: + return self._get_attr("isScrollControlled", data_type="bool", def_value=False) + + @is_scroll_controlled.setter + def is_scroll_controlled(self, value: Optional[bool]): + self._set_attr("isScrollControlled", value) + # content @property def content(self):