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,8 +36,7 @@ class CupertinoTextField(TextField):
|
|
|
36
36
|
|
|
37
37
|
placeholder_style: Optional[TextStyle] = None
|
|
38
38
|
"""
|
|
39
|
-
The [`TextStyle`][flet.
|
|
40
|
-
[`placeholder_text`][flet.CupertinoTextField.placeholder_text].
|
|
39
|
+
The [`TextStyle`][flet.] to use for [`placeholder_text`][(c).].
|
|
41
40
|
"""
|
|
42
41
|
|
|
43
42
|
gradient: Optional[Gradient] = None
|
|
@@ -47,36 +46,37 @@ class CupertinoTextField(TextField):
|
|
|
47
46
|
|
|
48
47
|
blend_mode: Optional[BlendMode] = None
|
|
49
48
|
"""
|
|
50
|
-
The blend mode applied to the [`bgcolor`][
|
|
51
|
-
[`gradient`][flet.CupertinoTextField.gradient] background.
|
|
49
|
+
The blend mode applied to the [`bgcolor`][(c).] or [`gradient`][(c).] background.
|
|
52
50
|
"""
|
|
53
51
|
|
|
54
52
|
shadows: Optional[BoxShadowValue] = None
|
|
55
53
|
"""
|
|
56
|
-
A list of shadows behind
|
|
54
|
+
A list of shadows behind this text field.
|
|
57
55
|
"""
|
|
58
56
|
|
|
59
57
|
prefix_visibility_mode: OverlayVisibilityMode = OverlayVisibilityMode.ALWAYS
|
|
60
58
|
"""
|
|
61
|
-
Defines the visibility of the [`prefix`][
|
|
59
|
+
Defines the visibility of the [`prefix`][(c).] control
|
|
62
60
|
based on the state of text entry.
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
Note:
|
|
63
|
+
Has no effect if [`prefix`][(c).] is not specified.
|
|
65
64
|
"""
|
|
66
65
|
|
|
67
66
|
suffix_visibility_mode: OverlayVisibilityMode = OverlayVisibilityMode.ALWAYS
|
|
68
67
|
"""
|
|
69
|
-
Defines the visibility of the [`suffix`][
|
|
68
|
+
Defines the visibility of the [`suffix`][(c).] control
|
|
70
69
|
based on the state of text entry.
|
|
71
70
|
|
|
72
|
-
|
|
71
|
+
Note:
|
|
72
|
+
Has no effect if [`suffix`][(c).] is not specified.
|
|
73
73
|
"""
|
|
74
74
|
|
|
75
75
|
clear_button_visibility_mode: OverlayVisibilityMode = OverlayVisibilityMode.NEVER
|
|
76
76
|
"""
|
|
77
77
|
Defines the visibility of the clear button based on the state of text entry.
|
|
78
78
|
|
|
79
|
-
Will appear only if no [`suffix`][
|
|
79
|
+
Will appear only if no [`suffix`][(c).] is provided.
|
|
80
80
|
"""
|
|
81
81
|
|
|
82
82
|
clear_button_semantics_label: Optional[str] = "Clear"
|
|
@@ -88,16 +88,12 @@ class CupertinoTextField(TextField):
|
|
|
88
88
|
|
|
89
89
|
image: Optional[DecorationImage] = None
|
|
90
90
|
"""
|
|
91
|
-
An image to paint above the [`bgcolor`][
|
|
92
|
-
[`gradient`][flet.CupertinoTextField.gradient] background.
|
|
91
|
+
An image to paint above the [`bgcolor`][(c).] or [`gradient`][(c).] background.
|
|
93
92
|
"""
|
|
94
93
|
|
|
95
94
|
padding: PaddingValue = field(default_factory=lambda: Padding.all(7))
|
|
96
95
|
"""
|
|
97
|
-
The padding around the text entry area between the
|
|
98
|
-
[`
|
|
99
|
-
|
|
100
|
-
clear button when
|
|
101
|
-
[`clear_button_visibility_mode`][flet.CupertinoTextField.clear_button_visibility_mode]
|
|
102
|
-
is not [`OverlayVisibilityMode.NEVER`][flet.OverlayVisibilityMode.NEVER].
|
|
96
|
+
The padding around the text entry area between the [`prefix`][(c).]
|
|
97
|
+
and [`suffix`][(c).] or the clear button when [`clear_button_visibility_mode`][(c).]
|
|
98
|
+
is not [`OverlayVisibilityMode.NEVER`][flet.].
|
|
103
99
|
"""
|
|
@@ -24,7 +24,7 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
24
24
|
A countdown timer picker in iOS style.
|
|
25
25
|
|
|
26
26
|
It can show a countdown duration with hour, minute and second spinners. The
|
|
27
|
-
duration is bound between 0 and 23 hours 59 minutes 59 seconds.
|
|
27
|
+
duration is bound between `0` and `23` hours `59` minutes `59` seconds.
|
|
28
28
|
|
|
29
29
|
Raises:
|
|
30
30
|
AssertionError: If [`value`][(c).] is negative.
|
|
@@ -42,12 +42,14 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
42
42
|
|
|
43
43
|
value: DurationValue = field(default_factory=lambda: Duration())
|
|
44
44
|
"""
|
|
45
|
-
The initial duration
|
|
45
|
+
The initial duration of the countdown timer.
|
|
46
|
+
|
|
47
|
+
If specified as an integer, it will be assumed to be in seconds.
|
|
46
48
|
"""
|
|
47
49
|
|
|
48
50
|
alignment: Alignment = field(default_factory=lambda: Alignment.CENTER)
|
|
49
51
|
"""
|
|
50
|
-
Defines how
|
|
52
|
+
Defines how this picker should be positioned within its parent.
|
|
51
53
|
"""
|
|
52
54
|
|
|
53
55
|
second_interval: int = 1
|
|
@@ -68,12 +70,12 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
68
70
|
|
|
69
71
|
mode: CupertinoTimerPickerMode = CupertinoTimerPickerMode.HOUR_MINUTE_SECONDS
|
|
70
72
|
"""
|
|
71
|
-
The mode of
|
|
73
|
+
The mode of this picker.
|
|
72
74
|
"""
|
|
73
75
|
|
|
74
76
|
bgcolor: Optional[ColorValue] = None
|
|
75
77
|
"""
|
|
76
|
-
The background color of this
|
|
78
|
+
The background color of this picker.
|
|
77
79
|
"""
|
|
78
80
|
|
|
79
81
|
item_extent: Number = 32.0
|
|
@@ -85,9 +87,10 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
85
87
|
"""
|
|
86
88
|
Called when the timer's duration changes.
|
|
87
89
|
|
|
88
|
-
The [`data`][flet.Event] property of the event
|
|
89
|
-
|
|
90
|
-
[`value`][
|
|
90
|
+
The [`data`][flet.Event.] property of the event
|
|
91
|
+
handler contains the new duration value.
|
|
92
|
+
Its type matches [`value`][(c).]: if `value` is a `Duration`,
|
|
93
|
+
then `data` is also a `Duration`; otherwise, it is an `int` (seconds).
|
|
91
94
|
"""
|
|
92
95
|
|
|
93
96
|
def before_update(self):
|
flet/controls/exceptions.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
__all__ = [
|
|
2
2
|
"FletException",
|
|
3
|
-
"FletUnsupportedPlatformException",
|
|
4
|
-
"FletUnimplementedPlatformException",
|
|
5
3
|
"FletPageDisconnectedException",
|
|
4
|
+
"FletUnimplementedPlatformException",
|
|
5
|
+
"FletUnsupportedPlatformException",
|
|
6
6
|
]
|
|
7
7
|
|
|
8
8
|
|
|
@@ -12,9 +12,9 @@ class FletException(Exception):
|
|
|
12
12
|
|
|
13
13
|
See these subclasses/implementations:
|
|
14
14
|
|
|
15
|
-
- [`FletUnsupportedPlatformException`][flet.
|
|
16
|
-
- [`FletUnimplementedPlatformException`][flet.
|
|
17
|
-
- [`FletPageDisconnectedException`][flet.
|
|
15
|
+
- [`FletUnsupportedPlatformException`][flet.]
|
|
16
|
+
- [`FletUnimplementedPlatformException`][flet.]
|
|
17
|
+
- [`FletPageDisconnectedException`][flet.]
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
|
flet/controls/icon_data.py
CHANGED
|
@@ -13,8 +13,8 @@ class IconData(IntEnum):
|
|
|
13
13
|
|
|
14
14
|
An icon can come from:
|
|
15
15
|
|
|
16
|
-
- the Material icon set via the [`Icons`][flet.
|
|
17
|
-
- the Cupertino icon set via the [`CupertinoIcons`][flet.
|
|
16
|
+
- the Material icon set via the [`Icons`][flet.] enum,
|
|
17
|
+
- the Cupertino icon set via the [`CupertinoIcons`][flet.] enum,
|
|
18
18
|
- or a custom icon set defined by the developer.
|
|
19
19
|
|
|
20
20
|
Internally, an icon is stored as an integer that encodes icon's index
|
flet/controls/keys.py
CHANGED
flet/controls/layout_control.py
CHANGED
|
@@ -31,7 +31,7 @@ class LayoutControl(Control):
|
|
|
31
31
|
|
|
32
32
|
Note:
|
|
33
33
|
Effective only if this control is a descendant of one of the following:
|
|
34
|
-
[`Stack`][flet.
|
|
34
|
+
[`Stack`][flet.] control, [`Page.overlay`][flet.] list.
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
37
|
top: Optional[Number] = None
|
|
@@ -40,7 +40,7 @@ class LayoutControl(Control):
|
|
|
40
40
|
|
|
41
41
|
Note:
|
|
42
42
|
Effective only if this control is a descendant of one of the following:
|
|
43
|
-
[`Stack`][flet.
|
|
43
|
+
[`Stack`][flet.] control, [`Page.overlay`][flet.] list.
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
right: Optional[Number] = None
|
|
@@ -49,7 +49,7 @@ class LayoutControl(Control):
|
|
|
49
49
|
|
|
50
50
|
Note:
|
|
51
51
|
Effective only if this control is a descendant of one of the following:
|
|
52
|
-
[`Stack`][flet.
|
|
52
|
+
[`Stack`][flet.] control, [`Page.overlay`][flet.] list.
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
55
|
bottom: Optional[Number] = None
|
|
@@ -58,7 +58,7 @@ class LayoutControl(Control):
|
|
|
58
58
|
|
|
59
59
|
Note:
|
|
60
60
|
Effective only if this control is a descendant of one of the following:
|
|
61
|
-
[`Stack`][flet.
|
|
61
|
+
[`Stack`][flet.] control, [`Page.overlay`][flet.] list.
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
64
|
align: Optional[Alignment] = None
|
|
@@ -164,15 +164,15 @@ class LayoutControl(Control):
|
|
|
164
164
|
"""
|
|
165
165
|
aspect_ratio: Optional[Number] = None
|
|
166
166
|
"""
|
|
167
|
-
|
|
167
|
+
The aspect ratio of the control.
|
|
168
|
+
It is defined as the ratio of the width to the height.
|
|
168
169
|
"""
|
|
169
170
|
|
|
170
171
|
animate_opacity: Optional[AnimationValue] = None
|
|
171
172
|
"""
|
|
172
|
-
Enables implicit animation of the [`opacity`][flet.LayoutControl.
|
|
173
|
-
property.
|
|
173
|
+
Enables implicit animation of the [`opacity`][flet.LayoutControl.] property.
|
|
174
174
|
|
|
175
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
175
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
176
176
|
"""
|
|
177
177
|
|
|
178
178
|
animate_size: Optional[AnimationValue] = None
|
|
@@ -183,50 +183,45 @@ class LayoutControl(Control):
|
|
|
183
183
|
animate_position: Optional[AnimationValue] = None
|
|
184
184
|
"""
|
|
185
185
|
Enables implicit animation of the positioning properties
|
|
186
|
-
([`left`][flet.LayoutControl.
|
|
187
|
-
[`top`][flet.LayoutControl.
|
|
188
|
-
[`bottom`][flet.LayoutControl.bottom]).
|
|
186
|
+
([`left`][flet.LayoutControl.], [`right`][flet.LayoutControl.],
|
|
187
|
+
[`top`][flet.LayoutControl.] and [`bottom`][flet.LayoutControl.]).
|
|
189
188
|
|
|
190
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
189
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
191
190
|
"""
|
|
192
191
|
|
|
193
192
|
animate_align: Optional[AnimationValue] = None
|
|
194
193
|
"""
|
|
195
|
-
Enables implicit animation of the [`align`][flet.LayoutControl.
|
|
196
|
-
property.
|
|
194
|
+
Enables implicit animation of the [`align`][flet.LayoutControl.] property.
|
|
197
195
|
|
|
198
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
196
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
199
197
|
"""
|
|
200
198
|
|
|
201
199
|
animate_margin: Optional[AnimationValue] = None
|
|
202
200
|
"""
|
|
203
|
-
Enables implicit animation of the [`margin`][flet.LayoutControl.
|
|
204
|
-
property.
|
|
201
|
+
Enables implicit animation of the [`margin`][flet.LayoutControl.] property.
|
|
205
202
|
|
|
206
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
203
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
207
204
|
"""
|
|
208
205
|
|
|
209
206
|
animate_rotation: Optional[AnimationValue] = None
|
|
210
207
|
"""
|
|
211
|
-
Enables implicit animation of the [`rotate`][flet.LayoutControl.
|
|
212
|
-
property.
|
|
208
|
+
Enables implicit animation of the [`rotate`][flet.LayoutControl.] property.
|
|
213
209
|
|
|
214
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
210
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
215
211
|
"""
|
|
216
212
|
|
|
217
213
|
animate_scale: Optional[AnimationValue] = None
|
|
218
214
|
"""
|
|
219
|
-
Enables implicit animation of the [`scale`][flet.LayoutControl.
|
|
215
|
+
Enables implicit animation of the [`scale`][flet.LayoutControl.] property.
|
|
220
216
|
|
|
221
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
217
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
222
218
|
"""
|
|
223
219
|
|
|
224
220
|
animate_offset: Optional[AnimationValue] = None
|
|
225
221
|
"""
|
|
226
|
-
Enables implicit animation of the [`offset`][flet.LayoutControl.
|
|
227
|
-
property.
|
|
222
|
+
Enables implicit animation of the [`offset`][flet.LayoutControl.] property.
|
|
228
223
|
|
|
229
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
224
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
230
225
|
"""
|
|
231
226
|
|
|
232
227
|
on_animation_end: Optional[ControlEventHandler["LayoutControl"]] = None
|
|
@@ -238,7 +233,7 @@ class LayoutControl(Control):
|
|
|
238
233
|
The `data` property of the event handler argument contains the name
|
|
239
234
|
of the animation.
|
|
240
235
|
|
|
241
|
-
More information [here](https://docs.flet-docs.pages.dev/cookbook/
|
|
236
|
+
More information [here](https://docs.flet-docs.pages.dev/cookbook/animations).
|
|
242
237
|
"""
|
|
243
238
|
|
|
244
239
|
|
|
@@ -38,8 +38,8 @@ class AlertDialog(DialogControl):
|
|
|
38
38
|
The content of this dialog is displayed in the center of this dialog in a
|
|
39
39
|
lighter font.
|
|
40
40
|
|
|
41
|
-
Typically this is a [`Column`][flet.
|
|
42
|
-
that contains this dialog's [`Text`][flet.
|
|
41
|
+
Typically this is a [`Column`][flet.]
|
|
42
|
+
that contains this dialog's [`Text`][flet.] message.
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
45
|
modal: bool = False
|
|
@@ -51,15 +51,14 @@ class AlertDialog(DialogControl):
|
|
|
51
51
|
"""
|
|
52
52
|
The title of this dialog is displayed in a large font at its top.
|
|
53
53
|
|
|
54
|
-
Typically a [`Text`][flet.
|
|
54
|
+
Typically a [`Text`][flet.] control.
|
|
55
55
|
"""
|
|
56
56
|
|
|
57
57
|
actions: list[Control] = field(default_factory=list)
|
|
58
58
|
"""
|
|
59
59
|
A set of actions that are displayed at the bottom of this dialog.
|
|
60
60
|
|
|
61
|
-
Typically this is a list of [`TextButton`][flet.
|
|
62
|
-
controls.
|
|
61
|
+
Typically this is a list of [`TextButton`][flet.] controls.
|
|
63
62
|
"""
|
|
64
63
|
|
|
65
64
|
bgcolor: Optional[ColorValue] = None
|
|
@@ -76,37 +75,35 @@ class AlertDialog(DialogControl):
|
|
|
76
75
|
"""
|
|
77
76
|
A control that is displayed at the top of this dialog.
|
|
78
77
|
|
|
79
|
-
Typically a [`Icon`][flet.
|
|
78
|
+
Typically a [`Icon`][flet.] control.
|
|
80
79
|
"""
|
|
81
80
|
|
|
82
81
|
title_padding: Optional[PaddingValue] = None
|
|
83
82
|
"""
|
|
84
|
-
Padding around the [`title`][
|
|
83
|
+
Padding around the [`title`][(c).].
|
|
85
84
|
|
|
86
85
|
If there is no title, no padding will be provided. Otherwise, this padding is used.
|
|
87
86
|
|
|
88
|
-
Defaults to
|
|
89
|
-
[`
|
|
90
|
-
|
|
91
|
-
is provided (but see [`content_padding`][flet.AlertDialog.content_padding]).
|
|
87
|
+
Defaults to `24` pixels on the top, left, and right of the [`title`][(c).].
|
|
88
|
+
If the [`content`][(c).] is not `None`, then no bottom padding
|
|
89
|
+
is provided (see [`content_padding`][(c).]).
|
|
92
90
|
If it is not set, then an extra `20` pixels of bottom padding is added to separate
|
|
93
|
-
the `title` from the `actions
|
|
91
|
+
the [`title`][(c).] from the [`actions`][(c).].
|
|
94
92
|
"""
|
|
95
93
|
|
|
96
94
|
content_padding: Optional[PaddingValue] = None
|
|
97
95
|
"""
|
|
98
|
-
Padding around the [`content`][
|
|
96
|
+
Padding around the [`content`][(c).].
|
|
99
97
|
|
|
100
|
-
If there is no `content`, no padding will be provided. Otherwise, padding of 20
|
|
101
|
-
pixels is provided above the content to separate the content from
|
|
102
|
-
padding of 24 pixels is provided on the left, right,
|
|
103
|
-
content from the other edges of this dialog.
|
|
98
|
+
If there is no `content`, no padding will be provided. Otherwise, padding of `20`
|
|
99
|
+
pixels is provided above the content to separate the [`content`][(c).] from
|
|
100
|
+
the [`title`][(c).], and padding of `24` pixels is provided on the left, right,
|
|
101
|
+
and bottom to separate the [`content`][(c).] from the other edges of this dialog.
|
|
104
102
|
"""
|
|
105
103
|
|
|
106
104
|
actions_padding: Optional[PaddingValue] = None
|
|
107
105
|
"""
|
|
108
|
-
Padding around the set of [`actions`][
|
|
109
|
-
this dialog.
|
|
106
|
+
Padding around the set of [`actions`][(c).] at the bottom of this dialog.
|
|
110
107
|
|
|
111
108
|
Typically used to provide padding to the button bar between the button bar and the
|
|
112
109
|
edges of this dialog.
|
|
@@ -119,56 +116,54 @@ class AlertDialog(DialogControl):
|
|
|
119
116
|
"""
|
|
120
117
|
Defines the horizontal layout of the actions.
|
|
121
118
|
|
|
122
|
-
Internally defaults to `MainAxisAlignment.END
|
|
119
|
+
Internally defaults to [`MainAxisAlignment.END`][flet.].
|
|
123
120
|
"""
|
|
124
121
|
|
|
125
122
|
shape: Optional[OutlinedBorder] = None
|
|
126
123
|
"""
|
|
127
124
|
The shape of this dialog.
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
it defaults to `RoundedRectangleBorder(radius=4.0)`.
|
|
126
|
+
If `None`, defaults to [`DialogTheme.shape`][flet.].
|
|
127
|
+
If it is also `None`, it defaults to `RoundedRectangleBorder(radius=4.0)`.
|
|
131
128
|
"""
|
|
132
129
|
|
|
133
130
|
inset_padding: Optional[PaddingValue] = None
|
|
134
131
|
"""
|
|
135
132
|
Padding around this dialog itself.
|
|
136
133
|
|
|
137
|
-
Defaults to `Padding.symmetric(vertical=40, horizontal=24)` - 40 pixels
|
|
138
|
-
horizontally and 24 pixels vertically outside of this dialog box.
|
|
134
|
+
Defaults to `Padding.symmetric(vertical=40, horizontal=24)` - `40` pixels
|
|
135
|
+
horizontally and `24` pixels vertically outside of this dialog box.
|
|
139
136
|
"""
|
|
140
137
|
|
|
141
138
|
icon_padding: Optional[PaddingValue] = None
|
|
142
139
|
"""
|
|
143
|
-
Padding around the [`icon`][
|
|
140
|
+
Padding around the [`icon`][(c).].
|
|
144
141
|
"""
|
|
145
142
|
|
|
146
143
|
action_button_padding: Optional[PaddingValue] = None
|
|
147
144
|
"""
|
|
148
|
-
The padding that surrounds each button in [`actions`][
|
|
145
|
+
The padding that surrounds each button in [`actions`][(c).].
|
|
149
146
|
"""
|
|
150
147
|
|
|
151
148
|
shadow_color: Optional[ColorValue] = None
|
|
152
149
|
"""
|
|
153
150
|
The color used to paint a drop shadow
|
|
154
|
-
under this dialog, which reflects this dialog's elevation.
|
|
151
|
+
under this dialog, which reflects this dialog's [`elevation`][(c).].
|
|
155
152
|
"""
|
|
156
153
|
|
|
157
154
|
icon_color: Optional[ColorValue] = None
|
|
158
155
|
"""
|
|
159
|
-
The color for the Icon in the [`icon`][
|
|
156
|
+
The color for the Icon in the [`icon`][(c).] of this dialog.
|
|
160
157
|
|
|
161
|
-
If `None`, [`DialogTheme.icon_color`][flet.
|
|
162
|
-
If that is null, defaults to color scheme's
|
|
163
|
-
[`
|
|
164
|
-
[`Theme.use_material3`][flet.Theme.use_material3] is `True`, `Colors.BLACK`
|
|
165
|
-
otherwise.
|
|
158
|
+
If `None`, [`DialogTheme.icon_color`][flet.] is used.
|
|
159
|
+
If that is null, defaults to color scheme's [`ColorScheme.secondary`][flet.] if
|
|
160
|
+
[`Theme.use_material3`][flet.] is `True`, `Colors.BLACK` otherwise.
|
|
166
161
|
"""
|
|
167
162
|
|
|
168
163
|
scrollable: bool = False
|
|
169
164
|
"""
|
|
170
|
-
Determines whether the [`title`][
|
|
171
|
-
[`content`][
|
|
165
|
+
Determines whether the [`title`][(c).] and
|
|
166
|
+
[`content`][(c).] controls are wrapped in a scrollable.
|
|
172
167
|
|
|
173
168
|
This configuration is used when the `title` and `content` are expected to overflow.
|
|
174
169
|
Both `title` and `content` are wrapped in a scroll view, allowing all overflowed
|
|
@@ -177,7 +172,7 @@ class AlertDialog(DialogControl):
|
|
|
177
172
|
|
|
178
173
|
actions_overflow_button_spacing: Optional[Number] = None
|
|
179
174
|
"""
|
|
180
|
-
The spacing between [`actions`][
|
|
175
|
+
The spacing between [`actions`][(c).] when the `OverflowBar`
|
|
181
176
|
switches to a column layout because the actions don't fit horizontally.
|
|
182
177
|
|
|
183
178
|
If the controls in `actions` do not fit into a single row, they are arranged into a
|
|
@@ -189,21 +184,19 @@ class AlertDialog(DialogControl):
|
|
|
189
184
|
"""
|
|
190
185
|
How to align this dialog.
|
|
191
186
|
|
|
192
|
-
If `None`, then [`DialogTheme.alignment`][flet.
|
|
193
|
-
If that is also `None`, the default is [`Alignment.CENTER`][flet.
|
|
187
|
+
If `None`, then [`DialogTheme.alignment`][flet.] is used.
|
|
188
|
+
If that is also `None`, the default is [`Alignment.CENTER`][flet.].
|
|
194
189
|
"""
|
|
195
190
|
|
|
196
191
|
content_text_style: Optional[TextStyle] = None
|
|
197
192
|
"""
|
|
198
|
-
The style for the text in the [`content`][
|
|
193
|
+
The style for the text in the [`content`][(c).] of this dialog.
|
|
199
194
|
|
|
200
|
-
If `None`, [`DialogTheme.content_text_style`][flet.
|
|
201
|
-
is used.
|
|
195
|
+
If `None`, [`DialogTheme.content_text_style`][flet.] is used.
|
|
202
196
|
If that's is also `None`, defaults to
|
|
203
|
-
[`TextTheme.body_medium`][flet.
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[`TextTheme.title_medium`][flet.TextTheme.title_medium] otherwise.
|
|
197
|
+
[`TextTheme.body_medium`][flet.] (if [`Theme.use_material3`][flet.] is `True`;
|
|
198
|
+
[`TextTheme.title_medium`][flet.] otherwise) of
|
|
199
|
+
[Theme.text_theme][flet.Theme.text_theme].
|
|
207
200
|
"""
|
|
208
201
|
|
|
209
202
|
title_text_style: Optional[TextStyle] = None
|
|
@@ -213,7 +206,8 @@ class AlertDialog(DialogControl):
|
|
|
213
206
|
|
|
214
207
|
clip_behavior: ClipBehavior = ClipBehavior.NONE
|
|
215
208
|
"""
|
|
216
|
-
Defines how the contents of this dialog are clipped (or not)
|
|
209
|
+
Defines how the contents of this dialog are clipped (or not)
|
|
210
|
+
to the given [`shape`][(c).].
|
|
217
211
|
"""
|
|
218
212
|
|
|
219
213
|
semantics_label: Optional[str] = None
|
|
@@ -221,8 +215,8 @@ class AlertDialog(DialogControl):
|
|
|
221
215
|
The semantic label of this dialog used by accessibility frameworks to announce
|
|
222
216
|
screen transitions when this dialog is opened and closed.
|
|
223
217
|
|
|
224
|
-
|
|
225
|
-
`title` if it is not
|
|
218
|
+
On iOS, if this label is not provided, a semantic label will be inferred from the
|
|
219
|
+
[`title`][(c).] if it is not `None`.
|
|
226
220
|
"""
|
|
227
221
|
|
|
228
222
|
barrier_color: Optional[ColorValue] = None
|
|
@@ -230,8 +224,8 @@ class AlertDialog(DialogControl):
|
|
|
230
224
|
The color of the modal barrier that
|
|
231
225
|
darkens everything below this dialog.
|
|
232
226
|
|
|
233
|
-
If `None`, then [`DialogTheme.barrier_color`][flet.
|
|
234
|
-
|
|
227
|
+
If `None`, then [`DialogTheme.barrier_color`][flet.] is used.
|
|
228
|
+
If that is also `None`, the default is `Colors.BLACK_54`.
|
|
235
229
|
"""
|
|
236
230
|
|
|
237
231
|
def before_update(self):
|