Skip to content

V1 breaking changes #5238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
11 of 19 tasks
InesaFitsner opened this issue Apr 24, 2025 · 0 comments
Open
11 of 19 tasks

V1 breaking changes #5238

InesaFitsner opened this issue Apr 24, 2025 · 0 comments
Assignees
Labels
breaking change Will disrupt existing functionality
Milestone

Comments

@InesaFitsner
Copy link
Contributor

InesaFitsner commented Apr 24, 2025

List of breaking changes in V1:

  • Alignment: will have to use ft.Alignment.center(); ft.alignment.center will not work
  • Control: key renamed to scroll_key
  • ScrollableControl: on_scroll_interval renamed to scroll_interval
  • Animation: instead of ft.animation.Animation use ft.Animation
  • Tabs: instead of text: OptionalString and tab_content: Optional[Control] use label: Optional[StrOrControl])
  • Pagelet: bottom_app_bar renamed to bottom_appbar
  • page.client_storage changed to page.shared_preferences.
  • Dialogs: page.show_dialog(dialog_name) instead of page.open(dialog_name); `page.pop_dialog() to close dialog
  • NavigationDrawer: position property instead of page.drawer and page.end_drawer
  • All buttons: no text property, use content instead
  • NavigationRailDesctination: no label_content property, use label instead
  • SafeArea.left, .top, .right, .bottom to SafeArea.avoid_intrusions_left, .avoid_intrusions_top, .avoid_intrusions_right, .avoid_intrusions_bottom.
  • Badge: use label instead of text
  • Padding, Margin: should have named, not positional arguments. For example, instead of ft.Padding.symmetric(0, 10) should be ft.Padding(vertical = 0, horizontal = 10)
  • SegmentedButton: selected: List[str] instead of Optional[Set]. Example: selected=["1", "4"] instead of selected={"1", "4"}. TODO: support sets in flet V1
  • CupertinoActionSheetAction, CupertinoDialogAction, CupertinoContextMenuAction: default instead of is_default_action; destructive instead of is_destructive_action
  • ft.app(target=main) should be changed to ft.run(main) or ft.run(main=main).
  • FilePicker is a service now and must be added to page.services to work. Also, it provides only async methods to open dialogs which return results right away -no "on_result" event anymore.
  • DragTarget.on_will_accept is of DragWillAcceptEvent type with accept: bool field. Use e.accept instead of e.data. DragTarget.on_leave is of DragTargetLeaveEvent type with src_id field. Use e.src_id instead of e.data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Will disrupt existing functionality
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants