Skip to content

Commit d0cc778

Browse files
EinswilliWgoeh
authored andcommitted
FletX.Core.Page: add busy indicator utilities to the FletX Page
1 parent 46725bd commit d0cc778

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

fletx/core/page.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,19 @@ def open_bottom_sheet(
632632
bts.on_dismiss = on_dismiss
633633

634634
self.page_instance.open(bts)
635+
636+
def show_loader(
637+
self,
638+
content: Optional[ft.Control] = None,
639+
on_dismiss: Optional[Callable[[ft.ControlEvent]]] = None
640+
):
641+
"""Show a given content in a dialog"""
642+
643+
dialog = ft.AlertDialog(
644+
content = content if content else ft.ProgressRing(),
645+
on_dismiss = on_dismiss
646+
)
647+
self.page_instance.open(dialog)
635648

636649
def refresh(self):
637650
"""Refresh the page"""

0 commit comments

Comments
 (0)