website/blog/2024-04-10-controls-and-theming-enhancements.md
One month after the release of Flet 0.21.0, we are excited to announce the release of Flet 0.22.0.
This release comes with a lot of enhancements, bug fixes, and deprecations:
This was one of the main concerns while coming up with this release. Two types of enhancements were made:
We went through the long list of already-present controls and exposed, where possible, more properties - PR #2882. This will grant you more power/control over the Flet Controls you use in your awesome applications.
Below is the complete list:
AppBar: elevation_on_scroll, exclude_header_semantics,
force_material_transparency, is_secondary, shadow_color, surface_tint_color, clip_behavior, title_spacing,
toolbar_opacity, title_text_style, toolbar_text_style, shapeAlertDialog: action_button_padding, clip_behavior, icon_padding,
shadow_color, surface_tint_colorBanner: content_text_style, margin, elevation, divider_color, shadow_color,
surface_tint_color, on_visibleCupertinoListTile: leading_size, leading_to_titleCupertinoSegmentedButton: click_colorCupertinoSwitch:on_label_color, off_label_colorCupertinoTimerPicker: item_extentChip: surface_tint_color, color, click_elevation, clip_behavior,
visual_density, border_sideDivider: leading_indent, trailing_indentExpansionTile: dense, enable_feedback, visual_densityCard: clip_behavior, is_semantic_container, show_border_on_foreground,
variantCheckbox: border_side, semantics_label, shape, splash_radius, is_error,
visual_density, mouse_cursorCircleAvatar: on_image_errorDataTable: clip_behaviorDatePicker: on_entry_mode_changeDraggable: on_drag_complete, on_drag_startDragTarget: on_moveDropdown: fill_color, hint_content, icon_content, elevation, item_height,
max_menu_height, icon_size, enable_feedback, padding, icon_enabled_color, icon_disabled_color, on_clickElevatedButton: clip_behaviorFloatingActionButton: clip_behavior, enable_feedback,
focus_color, foreground_color, disabled_elevation, elevation, focus_elevation, highlight_elevation, hover_elevation,
mouse_cursorGridView: cache_extent, clip_behavior, semantic_child_countIconButton: alignment, disabled_color, focus_color, enable_feedback,
hover_color, padding, splash_color, splash_radius, focus_color, mouse_cursor, visual_densityImage: exclude_from_semantics, filter_qualityListTile: enable_feedback, horizontal_spacing, min_leading_width,
min_vertical_padding, selected_color, selected_tile_color, style, title_alignment, icon_color, text_color, shape,
visual_density, mouse_cursor, title_text_style, subtitle_text_style, leading_and_trailing_text_styleListView: cache_extent, clip_behavior, semantic_child_countNavigationBar: animation_duration, overlay_colorNavigationDrawerDestination: bgcolorNavigationBarDestination: bgcolorNavigationRail: selected_label_text_style,
unselected_label_text_styleNavigationRailDestination: indicator_color, indicator_shapeOption: alignment, on_clickOutlinedButton: clip_behaviorPage: locale_configurationPopupMenuItem: height, padding,
mouse_cursorPopupMenuButton: bgcolor, clip_behavior, elevation,
enable_feedback, icon_color, shadow_color, surface_tint_color, icon_size, padding, splash_radius, shape, on_open,
on_cancelProgressBar: border_radius, semantics_label, semantics_valueProgressRing: semantics_label, semantics_value, stroke_cap,
stroke_alignRadio: focus_color, hover_color, overlay_color, splash_radius, toggleable,
visual_density, mouse_cursorSearchBar: keyboard_type, view_surface_tint_color, autofocusSelectionArea: on_changeSlider: interaction, overlay_color, mouse_cursor, secondary_track_value,
secondary_active_colorStack: alignment, fitSnackBar: clip_behavior, shape, on_visible, action_overflow_thresholdSwitch: hover_color, splash_radius, overlay_color, track_outline_color,
mouse_cursorTabs: divider_height, enable_feedback, indicator_thickness, is_secondary,
mouse_cursor, clip_behaviorTextField: fill_color, hover_colorTimePicker: orientation, on_entry_mode_changeTooltip: enable_tap_to_dismiss, exclude_from_semanticsVerticalDivider: leading_indent, trailing_indentIf you however feel that something lacks and should be added, don't hesitate to let us know.
Check out the article I wrote
concerning Page.locale_configuration here.
The Theme class which is used for application theming in light and dark mode has equally been further enhanced. Lots of new themes were introduced - PR #2955.
See the Theming Guide here.
Rive is a very popular real-time interactive design and animation tool.
The newly introduced Rive Control allows you to load and visualize any Rive
animation in your applications.
The animation's source (Rive.src) can either be a local asset file or a URL - as usual, it all depends on your needs.
As requested in #952, the ability to access the parent of any control has
been added: Control.parent.
Read more on it here.
The below issues were successfully fixed:
Dropdown.bgcolor was not visually respectedCircleAvatar not working with local asset images'FletSocketServer' Error raised on LinuxPopupMenuItem.data not respectedExpansionTile.initially_expanded had no visual effectPopupMenuButton had an always-visible tooltip of "Show menu"Special Thanks to the dynamic Flet community for reporting all the issues they encountered. We keep working hard on solving the remaining ones.
As previously mentioned in the announcement concerning Flet v0.21.0, all deprecations will be completely removed from the API in version 1.0 - so you have enough time to update your apps.
You must not completely memorize what has been deprecated as we've added DeprecationWarnings which will be shown directly in your console (without breaking your app).
PopupMenuButton.on_cancelled has been renamed
to on_cancelforeground_image_url
and background_image_url properties
of CircleAvatar were renamed
to foreground_image_src
and background_image_src respectivelyDragTargetAcceptEvent used in the DragTarget.on_accept has
been renamed to DragTargetEventThe Flet documentation has been reorganized to ease navigation (especially for beginners/new users).
Upgrade to Flet 0.22.0, test your apps and let us know how you find the new features we added. If you have any questions, please join Flet Discord server or create a new thread on Flet GitHub discussions.
Happy Flet-ing!