flet 0.70.0.dev5623__py3-none-any.whl → 0.70.0.dev5774__py3-none-any.whl
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/__init__.py +2 -0
- flet/controls/adaptive_control.py +16 -13
- flet/controls/base_page.py +5 -5
- flet/controls/border.py +4 -3
- flet/controls/box.py +6 -11
- flet/controls/buttons.py +7 -7
- flet/controls/context.py +2 -2
- flet/controls/control.py +18 -11
- flet/controls/core/animated_switcher.py +9 -13
- flet/controls/core/canvas/canvas.py +1 -1
- flet/controls/core/canvas/line.py +2 -3
- flet/controls/core/canvas/oval.py +1 -1
- flet/controls/core/canvas/shape.py +10 -10
- flet/controls/core/canvas/text.py +1 -1
- flet/controls/core/column.py +5 -5
- flet/controls/core/dismissible.py +8 -8
- flet/controls/core/drag_target.py +5 -4
- flet/controls/core/draggable.py +19 -14
- flet/controls/core/grid_view.py +2 -2
- flet/controls/core/image.py +1 -1
- flet/controls/core/interactive_viewer.py +2 -2
- flet/controls/core/list_view.py +7 -7
- flet/controls/core/markdown.py +1 -1
- flet/controls/core/pagelet.py +10 -10
- flet/controls/core/reorderable_draggable.py +1 -1
- flet/controls/core/responsive_row.py +7 -7
- flet/controls/core/row.py +8 -8
- flet/controls/core/semantics.py +9 -6
- flet/controls/core/shader_mask.py +3 -3
- flet/controls/core/stack.py +4 -4
- flet/controls/core/text.py +7 -7
- flet/controls/core/text_span.py +4 -4
- flet/controls/core/transparent_pointer.py +3 -3
- flet/controls/core/view.py +16 -16
- flet/controls/core/window.py +1 -1
- flet/controls/core/window_drag_area.py +1 -1
- flet/controls/cupertino/cupertino_action_sheet.py +19 -8
- flet/controls/cupertino/cupertino_activity_indicator.py +5 -6
- flet/controls/cupertino/cupertino_alert_dialog.py +7 -10
- flet/controls/cupertino/cupertino_app_bar.py +34 -34
- flet/controls/cupertino/cupertino_bottom_sheet.py +5 -5
- flet/controls/cupertino/cupertino_button.py +4 -4
- flet/controls/cupertino/cupertino_checkbox.py +33 -40
- flet/controls/cupertino/cupertino_context_menu.py +7 -6
- flet/controls/cupertino/cupertino_context_menu_action.py +2 -4
- flet/controls/cupertino/cupertino_date_picker.py +35 -37
- flet/controls/cupertino/cupertino_dialog_action.py +12 -9
- flet/controls/cupertino/cupertino_list_tile.py +24 -36
- flet/controls/cupertino/cupertino_navigation_bar.py +10 -11
- flet/controls/cupertino/cupertino_picker.py +11 -10
- flet/controls/cupertino/cupertino_radio.py +10 -13
- flet/controls/cupertino/cupertino_segmented_button.py +9 -12
- flet/controls/cupertino/cupertino_slider.py +6 -9
- flet/controls/cupertino/cupertino_sliding_segmented_button.py +14 -17
- flet/controls/cupertino/cupertino_switch.py +30 -41
- flet/controls/cupertino/cupertino_textfield.py +14 -18
- flet/controls/cupertino/cupertino_timer_picker.py +11 -8
- flet/controls/exceptions.py +5 -5
- flet/controls/icon_data.py +2 -2
- flet/controls/keys.py +2 -1
- flet/controls/layout_control.py +22 -27
- flet/controls/material/alert_dialog.py +44 -50
- flet/controls/material/app_bar.py +41 -45
- flet/controls/material/auto_complete.py +10 -8
- flet/controls/material/badge.py +32 -28
- flet/controls/material/banner.py +14 -14
- flet/controls/material/bottom_app_bar.py +7 -9
- flet/controls/material/bottom_sheet.py +10 -10
- flet/controls/material/button.py +2 -24
- flet/controls/material/card.py +10 -11
- flet/controls/material/checkbox.py +41 -49
- flet/controls/material/chip.py +44 -47
- flet/controls/material/circle_avatar.py +19 -22
- flet/controls/material/container.py +16 -123
- flet/controls/material/datatable.py +71 -95
- flet/controls/material/date_picker.py +13 -14
- flet/controls/material/date_range_picker.py +183 -0
- flet/controls/material/divider.py +24 -23
- flet/controls/material/dropdown.py +13 -13
- flet/controls/material/expansion_tile.py +5 -6
- flet/controls/material/filled_button.py +1 -1
- flet/controls/material/floating_action_button.py +2 -2
- flet/controls/material/form_field_control.py +64 -56
- flet/controls/material/icon_button.py +29 -65
- flet/controls/material/list_tile.py +25 -23
- flet/controls/material/menu_item_button.py +2 -2
- flet/controls/material/navigation_bar.py +3 -3
- flet/controls/material/navigation_rail.py +11 -11
- flet/controls/material/outlined_button.py +1 -1
- flet/controls/material/popup_menu_button.py +3 -3
- flet/controls/material/progress_bar.py +15 -22
- flet/controls/material/progress_ring.py +8 -8
- flet/controls/material/radio.py +3 -8
- flet/controls/material/range_slider.py +1 -1
- flet/controls/material/search_bar.py +15 -16
- flet/controls/material/segmented_button.py +4 -4
- flet/controls/material/selection_area.py +4 -3
- flet/controls/material/slider.py +16 -16
- flet/controls/material/snack_bar.py +33 -32
- flet/controls/material/submenu_button.py +9 -9
- flet/controls/material/switch.py +13 -13
- flet/controls/material/tabs.py +77 -78
- flet/controls/material/text_button.py +2 -2
- flet/controls/material/textfield.py +4 -6
- flet/controls/material/tooltip.py +16 -15
- flet/controls/material/vertical_divider.py +10 -10
- flet/controls/page.py +4 -4
- flet/controls/painting.py +2 -2
- flet/controls/scrollable_control.py +1 -1
- flet/controls/services/file_picker.py +7 -7
- flet/controls/services/haptic_feedback.py +1 -1
- flet/controls/services/shake_detector.py +1 -1
- flet/controls/services/storage_paths.py +3 -3
- flet/controls/text_style.py +1 -1
- flet/controls/theme.py +611 -609
- flet/controls/types.py +11 -11
- flet/testing/finder.py +2 -0
- flet/testing/flet_test_app.py +6 -4
- flet/version.py +1 -1
- {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/METADATA +5 -5
- flet-0.70.0.dev5774.dist-info/RECORD +239 -0
- flet-0.70.0.dev5623.dist-info/RECORD +0 -238
- {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/WHEEL +0 -0
- {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/entry_points.txt +0 -0
- {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/top_level.txt +0 -0
|
@@ -36,26 +36,25 @@ class Checkbox(LayoutControl, AdaptiveControl):
|
|
|
36
36
|
"""
|
|
37
37
|
The value of this checkbox.
|
|
38
38
|
|
|
39
|
-
- If `True
|
|
40
|
-
- If `False
|
|
41
|
-
- If `None` and [`tristate`][
|
|
42
|
-
is indeterminate
|
|
39
|
+
- If `True`, this checkbox is checked.
|
|
40
|
+
- If `False`, this checkbox is unchecked.
|
|
41
|
+
- If `None` and [`tristate`][(c).] is `True`, this checkbox
|
|
42
|
+
is indeterminate (displayed as a dash).
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
45
|
label_position: LabelPosition = LabelPosition.RIGHT
|
|
46
46
|
"""
|
|
47
|
-
Defines on which side of the checkbox the `label` should be shown.
|
|
47
|
+
Defines on which side of the checkbox the [`label`][(c).] should be shown.
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
50
|
label_style: Optional[TextStyle] = None
|
|
51
51
|
"""
|
|
52
|
-
The label's style.
|
|
52
|
+
The [`label`][(c).]'s text style.
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
55
|
tristate: bool = False
|
|
56
56
|
"""
|
|
57
|
-
If `True` the checkbox's [`value`][
|
|
58
|
-
or `None`.
|
|
57
|
+
If `True` the checkbox's [`value`][(c).] can be `True`, `False`, or `None`.
|
|
59
58
|
"""
|
|
60
59
|
|
|
61
60
|
autofocus: bool = False
|
|
@@ -67,52 +66,48 @@ class Checkbox(LayoutControl, AdaptiveControl):
|
|
|
67
66
|
|
|
68
67
|
fill_color: Optional[ControlStateValue[ColorValue]] = None
|
|
69
68
|
"""
|
|
70
|
-
The color that fills
|
|
71
|
-
all or specific [`ControlState`][flet.ControlState]s.
|
|
69
|
+
The color that fills this checkbox in all or specific [`ControlState`][flet.]s.
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
and [`ControlState.DEFAULT`][flet.ControlState.DEFAULT].
|
|
71
|
+
Note:
|
|
72
|
+
Supported states: [`ControlState.SELECTED`][flet.],
|
|
73
|
+
[`ControlState.HOVERED`][flet.], [`ControlState.DISABLED`][flet.],
|
|
74
|
+
[`ControlState.FOCUSED`][flet.], and [`ControlState.DEFAULT`][flet.].
|
|
78
75
|
"""
|
|
79
76
|
|
|
80
77
|
overlay_color: Optional[ControlStateValue[ColorValue]] = None
|
|
81
78
|
"""
|
|
82
|
-
The color of
|
|
83
|
-
various [`ControlState`][flet.ControlState] states.
|
|
79
|
+
The color of this checkbox's overlay in various [`ControlState`][flet.] states.
|
|
84
80
|
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
Note:
|
|
82
|
+
Supported states: [`ControlState.PRESSED`][flet.],
|
|
83
|
+
[`ControlState.SELECTED`][flet.], [`ControlState.HOVERED`][flet.],
|
|
84
|
+
[`ControlState.FOCUSED`][flet.], and [`ControlState.DEFAULT`][flet.].
|
|
87
85
|
"""
|
|
88
86
|
|
|
89
87
|
check_color: Optional[ColorValue] = None
|
|
90
88
|
"""
|
|
91
|
-
The color to use for the check icon when
|
|
92
|
-
this checkbox is checked.
|
|
89
|
+
The color to use for the check icon when this checkbox is checked.
|
|
93
90
|
"""
|
|
94
91
|
|
|
95
92
|
active_color: Optional[ColorValue] = None
|
|
96
93
|
"""
|
|
97
|
-
The color to use when this checkbox is
|
|
98
|
-
checked.
|
|
94
|
+
The color to use when this checkbox is checked.
|
|
99
95
|
"""
|
|
100
96
|
|
|
101
97
|
hover_color: Optional[ColorValue] = None
|
|
102
98
|
"""
|
|
103
|
-
The color to use when this checkbox is
|
|
104
|
-
hovered.
|
|
99
|
+
The color to use when this checkbox is hovered.
|
|
105
100
|
"""
|
|
106
101
|
|
|
107
102
|
focus_color: Optional[ColorValue] = None
|
|
108
103
|
"""
|
|
109
104
|
The color for the checkbox's Material when it has the input focus.
|
|
110
|
-
If [`overlay_color`][
|
|
111
|
-
[`ControlState.FOCUSED`][flet.
|
|
105
|
+
If [`overlay_color`][(c).] returns a non-None color in the
|
|
106
|
+
[`ControlState.FOCUSED`][flet.] state, it will be used instead.
|
|
112
107
|
|
|
113
|
-
Defaults to [`CheckboxTheme.overlay_color`][flet.
|
|
114
|
-
[`FOCUSED`][flet.
|
|
115
|
-
falls back to [`Theme.focus_color`][flet.
|
|
108
|
+
Defaults to [`CheckboxTheme.overlay_color`][flet.] in the
|
|
109
|
+
[`ControlState.FOCUSED`][flet.] state, or if that is `None`,
|
|
110
|
+
falls back to [`Theme.focus_color`][flet.].
|
|
116
111
|
"""
|
|
117
112
|
|
|
118
113
|
semantics_label: Optional[str] = None
|
|
@@ -125,7 +120,7 @@ class Checkbox(LayoutControl, AdaptiveControl):
|
|
|
125
120
|
"""
|
|
126
121
|
The shape of the checkbox.
|
|
127
122
|
|
|
128
|
-
Defaults to [`CheckboxTheme.shape`][flet.
|
|
123
|
+
Defaults to [`CheckboxTheme.shape`][flet.], or if that is `None`,
|
|
129
124
|
falls back to `RoundedRectangleBorder(radius=2)`.
|
|
130
125
|
"""
|
|
131
126
|
|
|
@@ -133,26 +128,23 @@ class Checkbox(LayoutControl, AdaptiveControl):
|
|
|
133
128
|
"""
|
|
134
129
|
The radius of the circular Material ink response (ripple) in logical pixels.
|
|
135
130
|
|
|
136
|
-
Defaults to [`CheckboxTheme.splash_radius`][flet.
|
|
131
|
+
Defaults to [`CheckboxTheme.splash_radius`][flet.],
|
|
137
132
|
or if that is `None`, falls back to `20.0`.
|
|
138
133
|
"""
|
|
139
134
|
|
|
140
135
|
border_side: Optional[ControlStateValue[BorderSide]] = None
|
|
141
136
|
"""
|
|
142
|
-
The color and width of
|
|
143
|
-
[`ControlState`][flet.
|
|
137
|
+
The color and width of this checkbox's border in all or specific
|
|
138
|
+
[`ControlState`][flet.]s.
|
|
144
139
|
|
|
145
|
-
|
|
146
|
-
[`ControlState.HOVERED`][flet.ControlState.HOVERED],
|
|
147
|
-
[`ControlState.DISABLED`][flet.ControlState.DISABLED],
|
|
148
|
-
[`ControlState.FOCUSED`][flet.ControlState.FOCUSED],
|
|
149
|
-
[`ControlState.PRESSED`][flet.ControlState.PRESSED],
|
|
150
|
-
[`ControlState.ERROR`][flet.ControlState.ERROR],
|
|
151
|
-
and [`ControlState.DEFAULT`][flet.ControlState.DEFAULT].
|
|
152
|
-
|
|
153
|
-
Defaults to [`CheckboxTheme.border_side`][flet.CheckboxTheme.border_side],
|
|
154
|
-
or if that is `None`,
|
|
140
|
+
Defaults to [`CheckboxTheme.border_side`][flet.], or if that is `None`,
|
|
155
141
|
falls back to `BorderSide` with a width of `2.0`.
|
|
142
|
+
|
|
143
|
+
Note:
|
|
144
|
+
Supported states: [`ControlState.SELECTED`][flet.],
|
|
145
|
+
[`ControlState.HOVERED`][flet.], [`ControlState.DISABLED`][flet.],
|
|
146
|
+
[`ControlState.FOCUSED`][flet.], [`ControlState.PRESSED`][flet.],
|
|
147
|
+
[`ControlState.ERROR`][flet.], and [`ControlState.DEFAULT`][flet.].
|
|
156
148
|
"""
|
|
157
149
|
|
|
158
150
|
error: bool = False
|
|
@@ -171,23 +163,23 @@ class Checkbox(LayoutControl, AdaptiveControl):
|
|
|
171
163
|
mouse_cursor: Optional[MouseCursor] = None
|
|
172
164
|
"""
|
|
173
165
|
The cursor to be displayed when a mouse pointer enters or is hovering over this
|
|
174
|
-
|
|
166
|
+
checkbox.
|
|
175
167
|
|
|
176
|
-
Defaults to [`CheckboxTheme.mouse_cursor`][flet.
|
|
168
|
+
Defaults to [`CheckboxTheme.mouse_cursor`][flet.],
|
|
177
169
|
or if that is `None`, falls back to `MouseCursor.CLICK`.
|
|
178
170
|
"""
|
|
179
171
|
|
|
180
172
|
on_change: Optional[ControlEventHandler["Checkbox"]] = None
|
|
181
173
|
"""
|
|
182
|
-
Called when the state of
|
|
174
|
+
Called when the state of this checkbox is changed.
|
|
183
175
|
"""
|
|
184
176
|
|
|
185
177
|
on_focus: Optional[ControlEventHandler["Checkbox"]] = None
|
|
186
178
|
"""
|
|
187
|
-
Called when
|
|
179
|
+
Called when this checkbox has received focus.
|
|
188
180
|
"""
|
|
189
181
|
|
|
190
182
|
on_blur: Optional[ControlEventHandler["Checkbox"]] = None
|
|
191
183
|
"""
|
|
192
|
-
Called when
|
|
184
|
+
Called when this checkbox has lost focus.
|
|
193
185
|
"""
|
flet/controls/material/chip.py
CHANGED
|
@@ -36,117 +36,112 @@ class Chip(LayoutControl):
|
|
|
36
36
|
|
|
37
37
|
label: StrOrControl
|
|
38
38
|
"""
|
|
39
|
-
The primary content of
|
|
39
|
+
The primary content of this chip.
|
|
40
40
|
|
|
41
|
-
Typically a [`Text`][flet.
|
|
41
|
+
Typically a [`Text`][flet.] control.
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
44
|
leading: Optional[Control] = None
|
|
45
45
|
"""
|
|
46
|
-
A `Control` to display to the left of
|
|
46
|
+
A `Control` to display to the left of this chip's [`label`][(c).].
|
|
47
47
|
|
|
48
|
-
Typically the leading control is an [`Icon`][flet.
|
|
49
|
-
or a [`CircleAvatar`][flet.CircleAvatar].
|
|
48
|
+
Typically the leading control is an [`Icon`][flet.] or a [`CircleAvatar`][flet.].
|
|
50
49
|
"""
|
|
51
50
|
|
|
52
51
|
selected: bool = False
|
|
53
52
|
"""
|
|
54
|
-
If `on_select` event is specified, `selected` property is used to
|
|
55
|
-
|
|
53
|
+
If [`on_select`][(c).] event is specified, `selected` property is used to
|
|
54
|
+
determine whether this chip is selected or not.
|
|
56
55
|
"""
|
|
57
56
|
|
|
58
57
|
selected_color: Optional[ColorValue] = None
|
|
59
58
|
"""
|
|
60
|
-
The color used for
|
|
61
|
-
when it is selected.
|
|
59
|
+
The color used for this chip's background when it is selected.
|
|
62
60
|
"""
|
|
63
61
|
|
|
64
62
|
elevation: Optional[Number] = None
|
|
65
63
|
"""
|
|
66
|
-
A non-negative value which defines the size of the shadow below
|
|
64
|
+
A non-negative value which defines the size of the shadow below this chip.
|
|
67
65
|
|
|
68
66
|
Defaults to `0`.
|
|
69
67
|
"""
|
|
70
68
|
|
|
71
69
|
bgcolor: Optional[ColorValue] = None
|
|
72
70
|
"""
|
|
73
|
-
Color to be used for the unselected,
|
|
74
|
-
enabled chip's background.
|
|
71
|
+
Color to be used for the unselected, enabled chip's background.
|
|
75
72
|
"""
|
|
76
73
|
|
|
77
74
|
show_checkmark: bool = True
|
|
78
75
|
"""
|
|
79
|
-
If `on_select` event is specified and chip is selected, `show_checkmark`
|
|
80
|
-
determine whether or not to show a checkmark.
|
|
76
|
+
If [`on_select`][(c).] event is specified and chip is selected, `show_checkmark`
|
|
77
|
+
is used to determine whether or not to show a checkmark.
|
|
81
78
|
"""
|
|
82
79
|
|
|
83
80
|
check_color: Optional[ColorValue] = None
|
|
84
81
|
"""
|
|
85
|
-
|
|
86
|
-
check mark is visible.
|
|
82
|
+
The color of this chip's check mark when a check mark is visible.
|
|
87
83
|
"""
|
|
88
84
|
|
|
89
85
|
shadow_color: Optional[ColorValue] = None
|
|
90
86
|
"""
|
|
91
|
-
The color used for
|
|
92
|
-
when the elevation is greater than `0` and
|
|
87
|
+
The color used for this chip's background
|
|
88
|
+
when the elevation is greater than `0` and this chip is not selected.
|
|
93
89
|
"""
|
|
94
90
|
|
|
95
91
|
shape: Optional[OutlinedBorder] = None
|
|
96
92
|
"""
|
|
97
|
-
The shape of the border around
|
|
93
|
+
The shape of the border around this chip.
|
|
98
94
|
|
|
99
|
-
Defaults to [`ChipTheme.shape`][flet.
|
|
95
|
+
Defaults to [`ChipTheme.shape`][flet.], or if that is resolves to
|
|
100
96
|
`None`, falls back to `RoundedRectangleBorder(radius=8)`.
|
|
101
97
|
"""
|
|
102
98
|
|
|
103
99
|
padding: Optional[PaddingValue] = None
|
|
104
100
|
"""
|
|
105
|
-
The padding between the [`label`][
|
|
101
|
+
The padding between the [`label`][(c).] and the outside shape.
|
|
106
102
|
|
|
107
103
|
Defaults to `8` logical pixels on all sides.
|
|
108
104
|
"""
|
|
109
105
|
|
|
110
106
|
delete_icon: Optional[Control] = None
|
|
111
107
|
"""
|
|
112
|
-
A `Control` to display to the right of
|
|
113
|
-
in case [`on_delete`][
|
|
108
|
+
A `Control` to display to the right of this chip's [`label`][(c).]
|
|
109
|
+
in case [`on_delete`][(c).] event is specified.
|
|
114
110
|
"""
|
|
115
111
|
|
|
116
112
|
delete_icon_tooltip: Optional[str] = None
|
|
117
113
|
"""
|
|
118
|
-
The text to be used for
|
|
114
|
+
The text to be used for this chip's `delete_icon` tooltip. If not provided or
|
|
119
115
|
provided with an empty string, the tooltip of the delete icon will not be displayed.
|
|
120
116
|
"""
|
|
121
117
|
|
|
122
118
|
delete_icon_color: Optional[ColorValue] = None
|
|
123
119
|
"""
|
|
124
|
-
The color of the [`delete_icon`][
|
|
120
|
+
The color of the [`delete_icon`][(c).].
|
|
125
121
|
"""
|
|
126
122
|
|
|
127
123
|
disabled_color: Optional[ColorValue] = None
|
|
128
124
|
"""
|
|
129
|
-
The color used for
|
|
130
|
-
if it is disabled.
|
|
125
|
+
The color used for this chip's background if it is disabled.
|
|
131
126
|
"""
|
|
132
127
|
|
|
133
128
|
label_padding: Optional[PaddingValue] = None
|
|
134
129
|
"""
|
|
135
|
-
The padding around the [`label`][
|
|
130
|
+
The padding around the [`label`][(c).].
|
|
136
131
|
|
|
137
132
|
By default, this is `4` logical pixels at the beginning and the end of
|
|
138
|
-
the [`label`][
|
|
133
|
+
the [`label`][(c).], and zero on `top` and `bottom`.
|
|
139
134
|
"""
|
|
140
135
|
|
|
141
136
|
label_text_style: Optional[TextStyle] = None
|
|
142
137
|
"""
|
|
143
|
-
The style to be applied to
|
|
138
|
+
The style to be applied to this chip's [`label`][(c).].
|
|
144
139
|
"""
|
|
145
140
|
|
|
146
141
|
selected_shadow_color: Optional[ColorValue] = None
|
|
147
142
|
"""
|
|
148
|
-
The color used for
|
|
149
|
-
when the elevation is greater than `0` and
|
|
143
|
+
The color used for this chip's background
|
|
144
|
+
when the elevation is greater than `0` and this chip is selected.
|
|
150
145
|
"""
|
|
151
146
|
|
|
152
147
|
autofocus: bool = False
|
|
@@ -159,13 +154,13 @@ class Chip(LayoutControl):
|
|
|
159
154
|
|
|
160
155
|
color: Optional[ControlStateValue[ColorValue]] = None
|
|
161
156
|
"""
|
|
162
|
-
The color that fills
|
|
157
|
+
The color that fills this chip in various [`ControlState`][flet.].
|
|
163
158
|
"""
|
|
164
159
|
|
|
165
160
|
elevation_on_click: Optional[Number] = None
|
|
166
161
|
"""
|
|
167
|
-
The elevation to be applied on
|
|
168
|
-
motion. This controls the size of the shadow below
|
|
162
|
+
The elevation to be applied on this chip relative to its parent during the press
|
|
163
|
+
motion. This controls the size of the shadow below this chip.
|
|
169
164
|
|
|
170
165
|
Defaults to `8.0`.
|
|
171
166
|
|
|
@@ -185,22 +180,22 @@ class Chip(LayoutControl):
|
|
|
185
180
|
|
|
186
181
|
border_side: Optional[BorderSide] = None
|
|
187
182
|
"""
|
|
188
|
-
Defines the color and weight of
|
|
183
|
+
Defines the color and weight of this chip's outline.
|
|
189
184
|
"""
|
|
190
185
|
|
|
191
186
|
leading_size_constraints: Optional[BoxConstraints] = None
|
|
192
187
|
"""
|
|
193
|
-
The size constraints for the [`leading`][
|
|
188
|
+
The size constraints for the [`leading`][(c).] control.
|
|
194
189
|
|
|
195
|
-
|
|
190
|
+
If `None`, it defaults to a minimum size of chip height or label height
|
|
196
191
|
(whichever is greater) and a padding of `8.0` pixels on all sides.
|
|
197
192
|
"""
|
|
198
193
|
|
|
199
194
|
delete_icon_size_constraints: Optional[BoxConstraints] = None
|
|
200
195
|
"""
|
|
201
|
-
The size constraints for the [`delete_icon`][
|
|
196
|
+
The size constraints for the [`delete_icon`][(c).] control.
|
|
202
197
|
|
|
203
|
-
|
|
198
|
+
If `None`, it defaults to a minimum size of chip height or label height
|
|
204
199
|
(whichever is greater) and a padding of 8.0 pixels on all sides.
|
|
205
200
|
"""
|
|
206
201
|
|
|
@@ -216,12 +211,12 @@ class Chip(LayoutControl):
|
|
|
216
211
|
|
|
217
212
|
leading_drawer_animation_style: Optional[AnimationStyle] = None
|
|
218
213
|
"""
|
|
219
|
-
The animation style for the [`leading`][
|
|
214
|
+
The animation style for the [`leading`][(c).] control's animations.
|
|
220
215
|
"""
|
|
221
216
|
|
|
222
217
|
delete_drawer_animation_style: Optional[AnimationStyle] = None
|
|
223
218
|
"""
|
|
224
|
-
The animation style for the [`delete_icon`][
|
|
219
|
+
The animation style for the [`delete_icon`][(c).]'s animations.
|
|
225
220
|
"""
|
|
226
221
|
|
|
227
222
|
on_click: Optional[ControlEventHandler["Chip"]] = None
|
|
@@ -229,20 +224,22 @@ class Chip(LayoutControl):
|
|
|
229
224
|
Called when the user clicks on this chip.
|
|
230
225
|
|
|
231
226
|
Note:
|
|
232
|
-
Cannot be specified together with [`on_select`][
|
|
227
|
+
Cannot be specified together with [`on_select`][(c).].
|
|
233
228
|
"""
|
|
234
229
|
|
|
235
230
|
on_delete: Optional[ControlEventHandler["Chip"]] = None
|
|
236
231
|
"""
|
|
237
|
-
Called when the user clicks on the [`delete_icon`][
|
|
232
|
+
Called when the user clicks on the [`delete_icon`][(c).].
|
|
238
233
|
"""
|
|
239
234
|
|
|
240
235
|
on_select: Optional[ControlEventHandler["Chip"]] = None
|
|
241
236
|
"""
|
|
242
|
-
Called when the user clicks on
|
|
237
|
+
Called when the user clicks on this chip.
|
|
238
|
+
|
|
239
|
+
It internally changes [`selected`][(c).] property to the opposite value.
|
|
243
240
|
|
|
244
|
-
|
|
245
|
-
|
|
241
|
+
Note:
|
|
242
|
+
Cannot be specified together with [`on_click`][(c).].
|
|
246
243
|
"""
|
|
247
244
|
|
|
248
245
|
on_focus: Optional[ControlEventHandler["Chip"]] = None
|
|
@@ -31,17 +31,17 @@ class CircleAvatar(LayoutControl):
|
|
|
31
31
|
"""
|
|
32
32
|
The content of this avatar.
|
|
33
33
|
|
|
34
|
-
Typically a [`Text`][flet.
|
|
34
|
+
Typically a [`Text`][flet.] control.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Tip:
|
|
37
|
+
If this avatar is to have an image, use [`background_image_src`][(c).] instead.
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
40
|
foreground_image_src: Optional[str] = None
|
|
41
41
|
"""
|
|
42
42
|
The source (local asset file or URL) of the foreground image in the circle.
|
|
43
43
|
|
|
44
|
-
Fallbacks to [`background_image_src`][
|
|
44
|
+
Fallbacks to [`background_image_src`][(c).].
|
|
45
45
|
|
|
46
46
|
Typically used as profile image.
|
|
47
47
|
"""
|
|
@@ -51,17 +51,16 @@ class CircleAvatar(LayoutControl):
|
|
|
51
51
|
The source (local asset file or URL) of the background image in the circle.
|
|
52
52
|
Changing the background image will cause the avatar to animate to the new image.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
[`content`][flet.CircleAvatar.content] instead.
|
|
54
|
+
If this avatar is to have the user's initials, use [`content`][(c).] instead.
|
|
55
|
+
|
|
56
|
+
Typically used as a fallback image for [`foreground_image_src`][(c).].
|
|
58
57
|
"""
|
|
59
58
|
|
|
60
59
|
color: Optional[ColorValue] = None
|
|
61
60
|
"""
|
|
62
61
|
The default color for text in this avatar.
|
|
63
62
|
|
|
64
|
-
Defaults to the primary text theme color if no `bgcolor` is specified.
|
|
63
|
+
Defaults to the primary text theme color if no [`bgcolor`][(c).] is specified.
|
|
65
64
|
"""
|
|
66
65
|
|
|
67
66
|
bgcolor: Optional[ColorValue] = None
|
|
@@ -74,15 +73,14 @@ class CircleAvatar(LayoutControl):
|
|
|
74
73
|
radius: Optional[Number] = None
|
|
75
74
|
"""
|
|
76
75
|
The size of the avatar, expressed as the radius (half the diameter). If `radius` is
|
|
77
|
-
specified, then neither [`min_radius`][
|
|
78
|
-
[`max_radius`][
|
|
76
|
+
specified, then neither [`min_radius`][(c).] nor
|
|
77
|
+
[`max_radius`][(c).] may be specified.
|
|
79
78
|
"""
|
|
80
79
|
|
|
81
80
|
min_radius: Optional[Number] = None
|
|
82
81
|
"""
|
|
83
82
|
The minimum size of the avatar, expressed as the radius (half the diameter). If
|
|
84
|
-
`min_radius` is specified, then [`radius`][
|
|
85
|
-
be specified.
|
|
83
|
+
`min_radius` is specified, then [`radius`][(c).] should not be specified.
|
|
86
84
|
|
|
87
85
|
Defaults to `0.0`.
|
|
88
86
|
"""
|
|
@@ -91,21 +89,20 @@ class CircleAvatar(LayoutControl):
|
|
|
91
89
|
"""
|
|
92
90
|
The maximum size of the avatar, expressed as the radius (half the diameter).
|
|
93
91
|
|
|
94
|
-
If `max_radius` is specified, then [`radius`][flet.CircleAvatar.radius] should
|
|
95
|
-
not be specified.
|
|
96
|
-
|
|
97
92
|
Defaults to "infinity".
|
|
93
|
+
|
|
94
|
+
Note:
|
|
95
|
+
If `max_radius` is specified, then [`radius`][(c).] should not be specified.
|
|
98
96
|
"""
|
|
99
97
|
|
|
100
98
|
on_image_error: Optional[ControlEventHandler["CircleAvatar"]] = None
|
|
101
99
|
"""
|
|
102
|
-
Called when an error occurs while loading the
|
|
103
|
-
[`
|
|
104
|
-
[`foreground_image_src`][flet.CircleAvatar.foreground_image_src].
|
|
100
|
+
Called when an error occurs while loading the [`background_image_src`][(c).] or
|
|
101
|
+
[`foreground_image_src`][(c).].
|
|
105
102
|
|
|
106
|
-
The [`data`][flet.Event.
|
|
107
|
-
a string whose value is either `"background"` or `"foreground"`
|
|
108
|
-
the error's origin.
|
|
103
|
+
The [`data`][flet.Event.] property of the event handler argument is
|
|
104
|
+
a string whose value is either `"background"` or `"foreground"`
|
|
105
|
+
indicating the error's origin.
|
|
109
106
|
"""
|
|
110
107
|
|
|
111
108
|
def before_update(self):
|