flet 0.70.0.dev6370__tar.gz → 0.70.0.dev6425__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flet might be problematic. Click here for more details.
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/PKG-INFO +1 -1
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/pyproject.toml +1 -1
- flet-0.70.0.dev6425/src/flet/components/hooks/use_state.py +81 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/stack.py +27 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/text.py +82 -35
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/auto_complete.py +41 -6
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/form_field_control.py +10 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/menu_item_button.py +1 -1
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/search_bar.py +24 -21
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/submenu_button.py +19 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/switch.py +5 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/text_button.py +8 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/textfield.py +28 -3
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/time_picker.py +8 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/file_picker.py +10 -6
- flet-0.70.0.dev6425/src/flet/controls/services/semantics_service.py +164 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/version.py +1 -1
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet.egg-info/PKG-INFO +1 -1
- flet-0.70.0.dev6370/src/flet/components/hooks/use_state.py +0 -58
- flet-0.70.0.dev6370/src/flet/controls/services/semantics_service.py +0 -52
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/README.md +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/setup.cfg +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/app.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/authorization.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/authorization_service.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/group.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/oauth_provider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/oauth_token.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/providers/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/providers/auth0_oauth_provider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/providers/azure_oauth_provider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/providers/github_oauth_provider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/providers/google_oauth_provider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/auth/user.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/canvas/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/cli.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/component.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/component_decorator.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/component_owned.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/hooks/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/hooks/hook.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/hooks/use_callback.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/hooks/use_context.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/hooks/use_effect.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/hooks/use_memo.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/memo.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/observable.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/public_utils.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/components/utils.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/adaptive_control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/alignment.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/animation.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/base_control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/base_page.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/blur.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/border.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/border_radius.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/box.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/buttons.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/colors.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/context.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/control_event.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/control_state.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/animated_switcher.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/autofill_group.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/arc.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/canvas.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/circle.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/color.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/fill.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/image.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/line.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/oval.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/path.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/points.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/rect.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/shadow.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/shape.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/canvas/text.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/column.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/dismissible.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/drag_target.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/draggable.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/flet_app.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/gesture_detector.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/grid_view.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/icon.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/image.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/interactive_viewer.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/keyboard_listener.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/list_view.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/markdown.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/merge_semantics.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/pagelet.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/placeholder.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/reorderable_draggable.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/responsive_row.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/row.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/safe_area.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/screenshot.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/semantics.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/shader_mask.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/text_span.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/transparent_pointer.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/view.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/window.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/core/window_drag_area.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_action_sheet.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_action_sheet_action.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_activity_indicator.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_alert_dialog.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_app_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_bottom_sheet.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_checkbox.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_colors.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_context_menu.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_context_menu_action.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_date_picker.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_dialog_action.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_filled_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_icons.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_list_tile.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_navigation_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_picker.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_radio.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_segmented_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_slider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_sliding_segmented_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_switch.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_textfield.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_timer_picker.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/cupertino/cupertino_tinted_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/device_info.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/dialog_control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/duration.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/embed_json_encoder.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/events.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/exceptions.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/geometry.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/gradients.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/icon_data.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/id_counter.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/keys.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/layout_control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/margin.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/alert_dialog.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/app_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/badge.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/banner.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/bottom_app_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/bottom_sheet.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/card.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/checkbox.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/chip.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/circle_avatar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/container.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/datatable.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/date_picker.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/date_range_picker.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/divider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/dropdown.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/dropdownm2.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/elevated_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/expansion_panel.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/expansion_tile.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/filled_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/filled_tonal_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/floating_action_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/icon_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/icons.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/list_tile.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/menu_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/navigation_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/navigation_drawer.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/navigation_rail.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/outlined_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/popup_menu_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/progress_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/progress_ring.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/radio.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/radio_group.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/range_slider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/reorderable_list_view.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/segmented_button.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/selection_area.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/slider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/snack_bar.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/tabs.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/tooltip.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/vertical_divider.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/multi_view.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/object_patch.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/padding.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/page.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/painting.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/query_string.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/ref.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/scrollable_control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/browser_context_menu.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/clipboard.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/haptic_feedback.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/service.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/shake_detector.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/shared_preferences.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/storage_paths.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/services/url_launcher.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/template_route.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/text_style.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/theme.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/transform.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/types.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/fastapi/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/messaging/connection.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/messaging/flet_socket_server.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/messaging/protocol.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/messaging/pyodide_connection.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/messaging/session.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/messaging/session_store.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/pubsub/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/pubsub/pubsub_client.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/pubsub/pubsub_hub.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/security/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/testing/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/testing/finder.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/testing/flet_test_app.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/testing/tester.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/__init__.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/browser.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/classproperty.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/deprecated.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/files.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/from_dict.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/hashing.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/json_utils.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/locks.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/network.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/object_model.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/once.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/pip.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/platform_utils.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/slugify.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/strings.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/utils/vector.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet.egg-info/SOURCES.txt +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet.egg-info/dependency_links.txt +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet.egg-info/entry_points.txt +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet.egg-info/requires.txt +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet.egg-info/top_level.txt +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_base_control.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_colors.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_dataclasses.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_datetime.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_events.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_from_dict.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_icons.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_object_diff_frozen.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_object_diff_in_place.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_object_diff_performance.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_observable.py +0 -0
- {flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/tests/test_patch_dataclass.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "flet"
|
|
3
|
-
version = "0.70.0.
|
|
3
|
+
version = "0.70.0.dev6425"
|
|
4
4
|
description = "Flet for Python - easily build interactive multi-platform apps in Python"
|
|
5
5
|
authors = [{name = "Appveyor Systems Inc.", email = "hello@flet.dev"}]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Callable
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from flet.components.hooks.hook import Hook
|
|
8
|
+
from flet.components.observable import Observable, ObservableSubscription
|
|
9
|
+
from flet.components.utils import current_component
|
|
10
|
+
|
|
11
|
+
StateT = TypeVar("StateT")
|
|
12
|
+
Updater = Callable[[StateT], StateT]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass
|
|
16
|
+
class StateHook(Hook):
|
|
17
|
+
value: Any
|
|
18
|
+
subscription: ObservableSubscription | None = None
|
|
19
|
+
version: int = 0
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def use_state(
|
|
23
|
+
initial: StateT | Callable[[], StateT],
|
|
24
|
+
) -> tuple[StateT, Callable[[StateT | Updater], None]]:
|
|
25
|
+
"""
|
|
26
|
+
Adds state to a function component, similar to React's useState().
|
|
27
|
+
|
|
28
|
+
The returned setter accepts either:
|
|
29
|
+
- a new value, or
|
|
30
|
+
- a function receiving the previous state and returning the next one.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
initial: Initial state value or a function returning it.
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
(value, set_value) tuple.
|
|
37
|
+
"""
|
|
38
|
+
component = current_component()
|
|
39
|
+
hook = component.use_hook(
|
|
40
|
+
lambda: StateHook(
|
|
41
|
+
component,
|
|
42
|
+
initial() if callable(initial) else initial,
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
def update_subscription(h: StateHook):
|
|
47
|
+
# Detach previous subscription if any
|
|
48
|
+
if h.subscription:
|
|
49
|
+
component._detach_observable_subscription(h.subscription)
|
|
50
|
+
h.subscription = None
|
|
51
|
+
|
|
52
|
+
# Attach new subscription if value is Observable
|
|
53
|
+
if isinstance(h.value, Observable):
|
|
54
|
+
h.subscription = component._attach_observable_subscription(h.value)
|
|
55
|
+
|
|
56
|
+
update_subscription(hook)
|
|
57
|
+
|
|
58
|
+
def set_state(new_value_or_fn: StateT | Updater):
|
|
59
|
+
"""
|
|
60
|
+
Update the state value.
|
|
61
|
+
|
|
62
|
+
Can be called with either:
|
|
63
|
+
- a direct new value, or
|
|
64
|
+
- a function that takes the current value and returns the next one.
|
|
65
|
+
"""
|
|
66
|
+
# Compute next value
|
|
67
|
+
new_value = (
|
|
68
|
+
new_value_or_fn(hook.value)
|
|
69
|
+
if callable(new_value_or_fn)
|
|
70
|
+
else new_value_or_fn
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# Only trigger update if value changed (shallow equality)
|
|
74
|
+
if new_value != hook.value:
|
|
75
|
+
hook.value = new_value
|
|
76
|
+
update_subscription(hook)
|
|
77
|
+
hook.version += 1
|
|
78
|
+
if hook.component:
|
|
79
|
+
hook.component._schedule_update()
|
|
80
|
+
|
|
81
|
+
return hook.value, set_state
|
|
@@ -31,6 +31,33 @@ class Stack(LayoutControl, AdaptiveControl):
|
|
|
31
31
|
Stack is also useful if you want to implement implicit animations
|
|
32
32
|
(https://flet.dev/docs/guides/python/animations/) that require knowing absolute
|
|
33
33
|
position of a target value.
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
ft.Stack(
|
|
37
|
+
width=300,
|
|
38
|
+
height=300,
|
|
39
|
+
controls=[
|
|
40
|
+
ft.Image(
|
|
41
|
+
src="https://picsum.photos/300/300",
|
|
42
|
+
width=300,
|
|
43
|
+
height=300,
|
|
44
|
+
fit=ft.BoxFit.CONTAIN,
|
|
45
|
+
),
|
|
46
|
+
ft.Row(
|
|
47
|
+
alignment=ft.MainAxisAlignment.CENTER,
|
|
48
|
+
controls=[
|
|
49
|
+
ft.Text(
|
|
50
|
+
value="Image title",
|
|
51
|
+
color=ft.Colors.SURFACE_TINT,
|
|
52
|
+
size=40,
|
|
53
|
+
weight=ft.FontWeight.BOLD,
|
|
54
|
+
opacity=0.5,
|
|
55
|
+
)
|
|
56
|
+
],
|
|
57
|
+
),
|
|
58
|
+
],
|
|
59
|
+
)
|
|
60
|
+
```
|
|
34
61
|
"""
|
|
35
62
|
|
|
36
63
|
controls: list[Control] = field(default_factory=list)
|
|
@@ -51,56 +51,96 @@ class TextSelection:
|
|
|
51
51
|
A range of text that represents a selection.
|
|
52
52
|
"""
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
"""
|
|
56
|
-
The index of the first character in the range.
|
|
57
|
-
"""
|
|
58
|
-
|
|
59
|
-
end: Optional[int] = None
|
|
60
|
-
"""
|
|
61
|
-
The next index after the characters in this range.
|
|
62
|
-
"""
|
|
63
|
-
|
|
64
|
-
selection: Optional[str] = None
|
|
65
|
-
"""
|
|
66
|
-
The text string that is selected.
|
|
67
|
-
"""
|
|
68
|
-
|
|
69
|
-
base_offset: Optional[int] = None
|
|
54
|
+
base_offset: int
|
|
70
55
|
"""
|
|
71
56
|
The offset at which the selection originates.
|
|
72
57
|
"""
|
|
73
58
|
|
|
74
|
-
extent_offset:
|
|
59
|
+
extent_offset: int
|
|
75
60
|
"""
|
|
76
61
|
The offset at which the selection terminates.
|
|
77
62
|
"""
|
|
78
63
|
|
|
79
|
-
affinity:
|
|
64
|
+
affinity: "TextAffinity" = TextAffinity.DOWNSTREAM
|
|
80
65
|
"""
|
|
81
66
|
If the text range is collapsed and has more than one visual location (e.g., occurs
|
|
82
67
|
at a line break), which of the two locations to use when painting the caret.
|
|
83
68
|
"""
|
|
84
69
|
|
|
85
|
-
directional:
|
|
70
|
+
directional: bool = False
|
|
86
71
|
"""
|
|
87
72
|
Whether this selection has disambiguated its base and extent.
|
|
88
73
|
"""
|
|
89
74
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
75
|
+
@property
|
|
76
|
+
def start(self) -> int:
|
|
77
|
+
"""
|
|
78
|
+
The index of the first character in the range.
|
|
79
|
+
|
|
80
|
+
Note:
|
|
81
|
+
This property is read-only.
|
|
82
|
+
"""
|
|
83
|
+
if self.base_offset < self.extent_offset:
|
|
84
|
+
return self.base_offset
|
|
85
|
+
else:
|
|
86
|
+
return self.extent_offset
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def end(self) -> int:
|
|
90
|
+
"""
|
|
91
|
+
The next index after the characters in this range.
|
|
92
|
+
|
|
93
|
+
Note:
|
|
94
|
+
This property is read-only.
|
|
95
|
+
"""
|
|
96
|
+
if self.base_offset < self.extent_offset:
|
|
97
|
+
return self.extent_offset
|
|
98
|
+
else:
|
|
99
|
+
return self.base_offset
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def is_valid(self) -> bool:
|
|
103
|
+
"""
|
|
104
|
+
Whether this range represents a valid position in the text.
|
|
105
|
+
|
|
106
|
+
Note:
|
|
107
|
+
This property is read-only.
|
|
108
|
+
"""
|
|
109
|
+
return self.start >= 0 and self.end >= 0
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def is_collapsed(self) -> bool:
|
|
113
|
+
"""
|
|
114
|
+
Whether this range is empty (but still potentially placed inside the text).
|
|
115
|
+
|
|
116
|
+
Note:
|
|
117
|
+
This property is read-only.
|
|
118
|
+
"""
|
|
119
|
+
return self.start == self.end
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def is_normalized(self) -> bool:
|
|
123
|
+
"""
|
|
124
|
+
Whether the start of this range precedes the end.
|
|
125
|
+
|
|
126
|
+
Note:
|
|
127
|
+
This property is read-only.
|
|
128
|
+
"""
|
|
129
|
+
return self.start <= self.end
|
|
130
|
+
|
|
131
|
+
def get_selected_text(self, source_text: str) -> str:
|
|
132
|
+
"""
|
|
133
|
+
Returns the selected text from the given full text.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
source_text: The full text to get the selection from.
|
|
137
|
+
|
|
138
|
+
Raises:
|
|
139
|
+
AssertionError: If the selection is not valid,
|
|
140
|
+
i.e. [`is_valid`][(c).] is `False`.
|
|
141
|
+
"""
|
|
142
|
+
assert self.is_valid
|
|
143
|
+
return source_text[self.start : self.end]
|
|
104
144
|
|
|
105
145
|
|
|
106
146
|
class TextSelectionChangeCause(Enum):
|
|
@@ -166,9 +206,16 @@ class TextSelectionChangeCause(Enum):
|
|
|
166
206
|
|
|
167
207
|
@dataclass
|
|
168
208
|
class TextSelectionChangeEvent(Event[EventControlType]):
|
|
169
|
-
text
|
|
170
|
-
|
|
209
|
+
"""An event emitted when the text selection changes."""
|
|
210
|
+
|
|
211
|
+
selected_text: str
|
|
212
|
+
"""The selected text."""
|
|
213
|
+
|
|
171
214
|
selection: TextSelection
|
|
215
|
+
"""The new text selection."""
|
|
216
|
+
|
|
217
|
+
cause: Optional[TextSelectionChangeCause] = None
|
|
218
|
+
"""The cause of the selection change."""
|
|
172
219
|
|
|
173
220
|
|
|
174
221
|
@control("Text")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from dataclasses import dataclass, field
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
|
+
from flet import LayoutControl
|
|
4
5
|
from flet.controls.base_control import control
|
|
5
|
-
from flet.controls.
|
|
6
|
-
from flet.controls.control_event import Event, EventHandler
|
|
6
|
+
from flet.controls.control_event import ControlEventHandler, Event, EventHandler
|
|
7
7
|
from flet.controls.types import Number
|
|
8
8
|
|
|
9
9
|
__all__ = ["AutoComplete", "AutoCompleteSelectEvent", "AutoCompleteSuggestion"]
|
|
@@ -11,22 +11,45 @@ __all__ = ["AutoComplete", "AutoCompleteSelectEvent", "AutoCompleteSuggestion"]
|
|
|
11
11
|
|
|
12
12
|
@dataclass
|
|
13
13
|
class AutoCompleteSuggestion:
|
|
14
|
+
"""
|
|
15
|
+
Represents a suggestion item for the [`AutoComplete`][flet.] control.
|
|
16
|
+
"""
|
|
17
|
+
|
|
14
18
|
key: str
|
|
19
|
+
"""A unique identifier or value used for filtering and selection."""
|
|
20
|
+
|
|
15
21
|
value: str
|
|
22
|
+
"""The display text shown to the user."""
|
|
16
23
|
|
|
17
24
|
|
|
18
25
|
@dataclass
|
|
19
26
|
class AutoCompleteSelectEvent(Event["AutoComplete"]):
|
|
27
|
+
"""Event representing the selection of a suggestion in the AutoComplete control."""
|
|
28
|
+
|
|
29
|
+
index: int
|
|
30
|
+
"""
|
|
31
|
+
The index of the selected suggestion from the corresponding
|
|
32
|
+
[`AutoComplete.suggestions`][flet.] list.
|
|
33
|
+
"""
|
|
34
|
+
|
|
20
35
|
selection: AutoCompleteSuggestion
|
|
36
|
+
"""The selected suggestion."""
|
|
21
37
|
|
|
22
38
|
|
|
23
39
|
@control("AutoComplete")
|
|
24
|
-
class AutoComplete(
|
|
40
|
+
class AutoComplete(LayoutControl):
|
|
25
41
|
"""
|
|
26
42
|
Helps the user make a selection by entering some text and choosing from among a
|
|
27
43
|
list of displayed options.
|
|
28
44
|
"""
|
|
29
45
|
|
|
46
|
+
value: str = ""
|
|
47
|
+
"""
|
|
48
|
+
Current text displayed in the input field.
|
|
49
|
+
|
|
50
|
+
This value reflects user input even if it does not match any provided suggestion.
|
|
51
|
+
"""
|
|
52
|
+
|
|
30
53
|
suggestions: list[AutoCompleteSuggestion] = field(default_factory=list)
|
|
31
54
|
"""
|
|
32
55
|
A list of [`AutoCompleteSuggestion`][flet.]
|
|
@@ -53,7 +76,19 @@ class AutoComplete(Control):
|
|
|
53
76
|
Called when a suggestion is selected.
|
|
54
77
|
"""
|
|
55
78
|
|
|
79
|
+
on_change: Optional[ControlEventHandler["AutoComplete"]] = None
|
|
80
|
+
"""
|
|
81
|
+
Called when the input text changes.
|
|
82
|
+
"""
|
|
83
|
+
|
|
56
84
|
@property
|
|
57
|
-
def selected_index(self):
|
|
58
|
-
|
|
59
|
-
|
|
85
|
+
def selected_index(self) -> Optional[int]:
|
|
86
|
+
"""
|
|
87
|
+
The index of the (last) selected suggestion.
|
|
88
|
+
|
|
89
|
+
It is `None` until a suggestion has been selected from the UI.
|
|
90
|
+
|
|
91
|
+
Note:
|
|
92
|
+
This property is read-only.
|
|
93
|
+
"""
|
|
94
|
+
return getattr(self, "_selected_index", None)
|
{flet-0.70.0.dev6370 → flet-0.70.0.dev6425}/src/flet/controls/material/form_field_control.py
RENAMED
|
@@ -324,4 +324,14 @@ class FormFieldControl(LayoutControl):
|
|
|
324
324
|
"""
|
|
325
325
|
|
|
326
326
|
async def focus(self):
|
|
327
|
+
"""
|
|
328
|
+
Request focus for this control.
|
|
329
|
+
|
|
330
|
+
Example:
|
|
331
|
+
```python
|
|
332
|
+
async def main(page: ft.Page):
|
|
333
|
+
page.add(ctf := ft.TextField())
|
|
334
|
+
await ctf.focus()
|
|
335
|
+
```
|
|
336
|
+
"""
|
|
327
337
|
await self._invoke_method("focus")
|
|
@@ -80,7 +80,7 @@ class MenuItemButton(LayoutControl):
|
|
|
80
80
|
|
|
81
81
|
on_click: Optional[ControlEventHandler["MenuItemButton"]] = None
|
|
82
82
|
"""
|
|
83
|
-
Called when the button is clicked.
|
|
83
|
+
Called when the button is clicked.If not defined the button will be disabled.
|
|
84
84
|
"""
|
|
85
85
|
|
|
86
86
|
on_hover: Optional[ControlEventHandler["MenuItemButton"]] = None
|
|
@@ -30,7 +30,8 @@ class SearchBar(LayoutControl):
|
|
|
30
30
|
controls: list[Control] = field(default_factory=list)
|
|
31
31
|
"""
|
|
32
32
|
The list of controls to be displayed below the search bar when in search view.
|
|
33
|
-
|
|
33
|
+
|
|
34
|
+
Typically [`ListTile`][flet.]s and will be displayed
|
|
34
35
|
in a [`ListView`][flet.].
|
|
35
36
|
"""
|
|
36
37
|
|
|
@@ -42,7 +43,8 @@ class SearchBar(LayoutControl):
|
|
|
42
43
|
bar_leading: Optional[Control] = None
|
|
43
44
|
"""
|
|
44
45
|
A control to display before the text input field when the search view is close.
|
|
45
|
-
|
|
46
|
+
|
|
47
|
+
Typically an [`Icon`][flet.] or an [`IconButton`][flet.].
|
|
46
48
|
"""
|
|
47
49
|
|
|
48
50
|
bar_trailing: Optional[list[Control]] = None
|
|
@@ -89,7 +91,7 @@ class SearchBar(LayoutControl):
|
|
|
89
91
|
"""
|
|
90
92
|
The color and weight of the search bar's outline.
|
|
91
93
|
|
|
92
|
-
This value is combined with [`
|
|
94
|
+
This value is combined with [`bar_shape`][(c).] to
|
|
93
95
|
create a shape decorated with an outline.
|
|
94
96
|
"""
|
|
95
97
|
|
|
@@ -97,8 +99,7 @@ class SearchBar(LayoutControl):
|
|
|
97
99
|
"""
|
|
98
100
|
The shape of the search bar.
|
|
99
101
|
|
|
100
|
-
This shape is combined with
|
|
101
|
-
[`SearchBar.bar_border_side`][flet.] to create a shape
|
|
102
|
+
This shape is combined with [`bar_border_side`][(c).] to create a shape
|
|
102
103
|
decorated with an outline.
|
|
103
104
|
"""
|
|
104
105
|
|
|
@@ -134,7 +135,8 @@ class SearchBar(LayoutControl):
|
|
|
134
135
|
view_leading: Optional[Control] = None
|
|
135
136
|
"""
|
|
136
137
|
A `Control` to display before the text input field when the search view is open.
|
|
137
|
-
|
|
138
|
+
|
|
139
|
+
Typically an [`Icon`][flet.] or an [`IconButton`][flet.].
|
|
138
140
|
|
|
139
141
|
Defaults to a back button which closes/pops the search view.
|
|
140
142
|
"""
|
|
@@ -154,8 +156,7 @@ class SearchBar(LayoutControl):
|
|
|
154
156
|
|
|
155
157
|
view_bgcolor: Optional[ColorValue] = None
|
|
156
158
|
"""
|
|
157
|
-
Defines the background color of the
|
|
158
|
-
search view.
|
|
159
|
+
Defines the background color of the search view.
|
|
159
160
|
"""
|
|
160
161
|
|
|
161
162
|
view_hint_text: Optional[str] = None
|
|
@@ -175,14 +176,12 @@ class SearchBar(LayoutControl):
|
|
|
175
176
|
|
|
176
177
|
view_header_text_style: Optional[TextStyle] = None
|
|
177
178
|
"""
|
|
178
|
-
Defines the
|
|
179
|
-
text being edited on the search view.
|
|
179
|
+
Defines the text style of the text being edited on the search view.
|
|
180
180
|
"""
|
|
181
181
|
|
|
182
182
|
view_hint_text_style: Optional[TextStyle] = None
|
|
183
183
|
"""
|
|
184
|
-
Defines the [`
|
|
185
|
-
`view_hint_text`.
|
|
184
|
+
Defines the text style of [`view_hint_text`][(c).].
|
|
186
185
|
"""
|
|
187
186
|
|
|
188
187
|
view_size_constraints: Optional[BoxConstraints] = None
|
|
@@ -232,7 +231,7 @@ class SearchBar(LayoutControl):
|
|
|
232
231
|
full_screen: bool = False
|
|
233
232
|
"""
|
|
234
233
|
Defines whether the search view grows to fill the entire screen when the search
|
|
235
|
-
bar is tapped.
|
|
234
|
+
bar is tapped.
|
|
236
235
|
"""
|
|
237
236
|
|
|
238
237
|
keyboard_type: KeyboardType = KeyboardType.TEXT
|
|
@@ -243,8 +242,6 @@ class SearchBar(LayoutControl):
|
|
|
243
242
|
autofocus: bool = False
|
|
244
243
|
"""
|
|
245
244
|
Whether the text field should focus itself if nothing else is already focused.
|
|
246
|
-
|
|
247
|
-
Defaults to `False`.
|
|
248
245
|
"""
|
|
249
246
|
|
|
250
247
|
on_tap: Optional[ControlEventHandler["SearchBar"]] = None
|
|
@@ -254,7 +251,7 @@ class SearchBar(LayoutControl):
|
|
|
254
251
|
|
|
255
252
|
on_tap_outside_bar: Optional[ControlEventHandler["SearchBar"]] = None
|
|
256
253
|
"""
|
|
257
|
-
|
|
254
|
+
Fired when the user taps outside the search bar while the search view is open.
|
|
258
255
|
"""
|
|
259
256
|
|
|
260
257
|
on_submit: Optional[ControlEventHandler["SearchBar"]] = None
|
|
@@ -269,12 +266,12 @@ class SearchBar(LayoutControl):
|
|
|
269
266
|
|
|
270
267
|
on_focus: Optional[ControlEventHandler["SearchBar"]] = None
|
|
271
268
|
"""
|
|
272
|
-
|
|
269
|
+
Fired when the search bar gains focus.
|
|
273
270
|
"""
|
|
274
271
|
|
|
275
272
|
on_blur: Optional[ControlEventHandler["SearchBar"]] = None
|
|
276
273
|
"""
|
|
277
|
-
|
|
274
|
+
Fired when the search bar loses focus.
|
|
278
275
|
"""
|
|
279
276
|
|
|
280
277
|
def __contains__(self, item):
|
|
@@ -285,15 +282,21 @@ class SearchBar(LayoutControl):
|
|
|
285
282
|
|
|
286
283
|
# Public methods
|
|
287
284
|
async def focus(self):
|
|
285
|
+
"""Requests focus for this control."""
|
|
288
286
|
await self._invoke_method("focus")
|
|
289
287
|
|
|
290
|
-
async def blur(self):
|
|
291
|
-
await self._invoke_method("blur")
|
|
292
|
-
|
|
293
288
|
async def open_view(self):
|
|
289
|
+
"""Opens the search view."""
|
|
294
290
|
await self._invoke_method("open_view")
|
|
295
291
|
|
|
296
292
|
async def close_view(self, text: Optional[str] = None):
|
|
293
|
+
"""
|
|
294
|
+
Closes an opened search view.
|
|
295
|
+
|
|
296
|
+
Args:
|
|
297
|
+
text: The text to set in the search bar when closing the view. If not
|
|
298
|
+
provided, the current [`value`][(c).] of the search bar will be used.
|
|
299
|
+
"""
|
|
297
300
|
await self._invoke_method(
|
|
298
301
|
"close_view", {"text": text if text is not None else self.value}
|
|
299
302
|
)
|
|
@@ -19,6 +19,25 @@ class SubmenuButton(LayoutControl):
|
|
|
19
19
|
A menu button that displays a cascading menu.
|
|
20
20
|
|
|
21
21
|
Typically used in a [`MenuBar`][flet.] control.
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
ft.SubmenuButton(
|
|
25
|
+
content=ft.Text("Choose text style"),
|
|
26
|
+
key="smbutton",
|
|
27
|
+
expand=True,
|
|
28
|
+
menu_style=ft.MenuStyle(
|
|
29
|
+
alignment=ft.Alignment.BOTTOM_LEFT, side=ft.BorderSide(1)
|
|
30
|
+
),
|
|
31
|
+
controls=[
|
|
32
|
+
ft.MenuItemButton(
|
|
33
|
+
content=ft.Text("Underlined"),
|
|
34
|
+
on_click=lambda e: print(f"{e.control.content.value}.on_click")
|
|
35
|
+
),
|
|
36
|
+
ft.MenuItemButton(...),
|
|
37
|
+
...
|
|
38
|
+
]
|
|
39
|
+
)
|
|
40
|
+
```
|
|
22
41
|
"""
|
|
23
42
|
|
|
24
43
|
content: Optional[StrOrControl] = None
|
|
@@ -26,6 +26,11 @@ class Switch(LayoutControl, AdaptiveControl):
|
|
|
26
26
|
two mutually exclusive options.
|
|
27
27
|
|
|
28
28
|
For example, "On/Off", "Show/Hide".
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
ft.Switch(label="Unchecked switch", value=False)
|
|
32
|
+
ft.Switch(label="Disabled switch", disabled=True)
|
|
33
|
+
```
|
|
29
34
|
"""
|
|
30
35
|
|
|
31
36
|
label: Optional[StrOrControl] = None
|
|
@@ -22,6 +22,14 @@ class TextButton(LayoutControl, AdaptiveControl):
|
|
|
22
22
|
Text buttons are used for the lowest priority actions, especially when presenting
|
|
23
23
|
multiple options. Text buttons can be placed on a variety of backgrounds. Until the
|
|
24
24
|
button is interacted with, its container isn’t visible.
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
ft.TextButton(
|
|
28
|
+
content="Text Button",
|
|
29
|
+
icon=ft.Icons.STAR_BORDER,
|
|
30
|
+
icon_color=ft.Colors.BLUE_300,
|
|
31
|
+
)
|
|
32
|
+
```
|
|
25
33
|
"""
|
|
26
34
|
|
|
27
35
|
content: Optional[StrOrControl] = None
|
|
@@ -4,8 +4,9 @@ from typing import Optional, Union
|
|
|
4
4
|
|
|
5
5
|
from flet.controls.adaptive_control import AdaptiveControl
|
|
6
6
|
from flet.controls.base_control import BaseControl, control
|
|
7
|
-
from flet.controls.control_event import ControlEventHandler
|
|
7
|
+
from flet.controls.control_event import ControlEventHandler, EventHandler
|
|
8
8
|
from flet.controls.core.autofill_group import AutofillHint
|
|
9
|
+
from flet.controls.core.text import TextSelection, TextSelectionChangeEvent
|
|
9
10
|
from flet.controls.material.form_field_control import FormFieldControl
|
|
10
11
|
from flet.controls.padding import PaddingValue
|
|
11
12
|
from flet.controls.text_style import StrutStyle
|
|
@@ -144,6 +145,19 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
144
145
|
Current value of the TextField.
|
|
145
146
|
"""
|
|
146
147
|
|
|
148
|
+
selection: Optional[TextSelection] = None
|
|
149
|
+
"""
|
|
150
|
+
Represents the current text selection or caret position in the field.
|
|
151
|
+
|
|
152
|
+
When the user selects text, this property is updated to reflect the selected range.
|
|
153
|
+
If no text is selected, it contains an empty range indicating the caret position.
|
|
154
|
+
|
|
155
|
+
Setting this property visually updates the field's selection to match the given
|
|
156
|
+
value, and hence leads to the [`on_selection_change`][(c).] event being triggered.
|
|
157
|
+
To ensure the selection is visible and the event is fired, the text field must
|
|
158
|
+
be focused. Call [`focus()`][(c).focus] on the field before setting this property.
|
|
159
|
+
"""
|
|
160
|
+
|
|
147
161
|
keyboard_type: KeyboardType = KeyboardType.TEXT
|
|
148
162
|
"""
|
|
149
163
|
The type of keyboard to use for editing the text.
|
|
@@ -151,7 +165,7 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
151
165
|
|
|
152
166
|
multiline: bool = False
|
|
153
167
|
"""
|
|
154
|
-
|
|
168
|
+
Whether this field can contain multiple lines of text.
|
|
155
169
|
"""
|
|
156
170
|
|
|
157
171
|
min_lines: Optional[int] = None
|
|
@@ -400,7 +414,8 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
400
414
|
"""
|
|
401
415
|
Helps the autofill service identify the type of this text input.
|
|
402
416
|
|
|
403
|
-
More information
|
|
417
|
+
More information
|
|
418
|
+
[here](https://api.flutter.dev/flutter/material/TextField/autofillHints.html).
|
|
404
419
|
"""
|
|
405
420
|
|
|
406
421
|
on_change: Optional[ControlEventHandler["TextField"]] = None
|
|
@@ -408,6 +423,16 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
408
423
|
Called when the typed input for the TextField has changed.
|
|
409
424
|
"""
|
|
410
425
|
|
|
426
|
+
on_selection_change: Optional[
|
|
427
|
+
EventHandler[TextSelectionChangeEvent["TextField"]]
|
|
428
|
+
] = None
|
|
429
|
+
"""
|
|
430
|
+
Called when the text selection or caret position changes.
|
|
431
|
+
|
|
432
|
+
This can be triggered either by user interaction (selecting text or moving
|
|
433
|
+
the caret) or programmatically (through the [`selection`][(c).] property).
|
|
434
|
+
"""
|
|
435
|
+
|
|
411
436
|
on_click: Optional[ControlEventHandler["TextField"]] = None
|
|
412
437
|
"""
|
|
413
438
|
TBD
|
|
@@ -38,6 +38,14 @@ class TimePicker(DialogControl):
|
|
|
38
38
|
|
|
39
39
|
Depending on the `time_picker_entry_mode`, it will show either a Dial or
|
|
40
40
|
an Input (hour and minute text fields) for picking a time.
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
ft.TimePicker(
|
|
44
|
+
value=time(1, 2),
|
|
45
|
+
time_picker_entry_mode=ft.TimePickerEntryMode.INPUT_ONLY,
|
|
46
|
+
open=True,
|
|
47
|
+
)
|
|
48
|
+
```
|
|
41
49
|
"""
|
|
42
50
|
|
|
43
51
|
value: Optional[time] = field(default_factory=lambda: datetime.now().time())
|