flet 0.70.0.dev6211__py3-none-any.whl → 0.70.0.dev6232__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/controls/base_control.py +1 -1
- flet/controls/border.py +3 -3
- flet/controls/control.py +6 -4
- flet/controls/core/animated_switcher.py +3 -3
- flet/controls/core/autofill_group.py +5 -3
- flet/controls/core/dismissible.py +9 -5
- flet/controls/core/drag_target.py +5 -3
- flet/controls/core/draggable.py +6 -4
- flet/controls/core/icon.py +9 -5
- flet/controls/core/interactive_viewer.py +16 -8
- flet/controls/core/pagelet.py +3 -3
- flet/controls/core/reorderable_draggable.py +5 -3
- flet/controls/core/safe_area.py +5 -3
- flet/controls/core/text_span.py +3 -3
- flet/controls/core/window_drag_area.py +3 -3
- flet/controls/cupertino/cupertino_action_sheet.py +4 -4
- flet/controls/cupertino/cupertino_action_sheet_action.py +3 -3
- flet/controls/cupertino/cupertino_activity_indicator.py +3 -3
- flet/controls/cupertino/cupertino_button.py +4 -4
- flet/controls/cupertino/cupertino_context_menu.py +6 -4
- flet/controls/cupertino/cupertino_context_menu_action.py +3 -3
- flet/controls/cupertino/cupertino_date_picker.py +26 -9
- flet/controls/cupertino/cupertino_dialog_action.py +3 -3
- flet/controls/cupertino/cupertino_list_tile.py +3 -3
- flet/controls/cupertino/cupertino_navigation_bar.py +8 -5
- flet/controls/cupertino/cupertino_picker.py +9 -4
- flet/controls/cupertino/cupertino_segmented_button.py +8 -5
- flet/controls/cupertino/cupertino_slider.py +10 -5
- flet/controls/cupertino/cupertino_sliding_segmented_button.py +8 -5
- flet/controls/cupertino/cupertino_timer_picker.py +16 -13
- flet/controls/material/alert_dialog.py +4 -4
- flet/controls/material/app_bar.py +10 -6
- flet/controls/material/banner.py +10 -6
- flet/controls/material/bottom_app_bar.py +3 -3
- flet/controls/material/bottom_sheet.py +3 -3
- flet/controls/material/chip.py +10 -6
- flet/controls/material/circle_avatar.py +12 -6
- flet/controls/material/datatable.py +34 -20
- flet/controls/material/divider.py +12 -6
- flet/controls/material/dropdown.py +3 -3
- flet/controls/material/expansion_tile.py +3 -3
- flet/controls/material/floating_action_button.py +19 -8
- flet/controls/material/icon_button.py +3 -3
- flet/controls/material/navigation_rail.py +9 -5
- flet/controls/material/outlined_button.py +3 -3
- flet/controls/material/progress_bar.py +9 -5
- flet/controls/material/radio_group.py +3 -3
- flet/controls/material/range_slider.py +15 -6
- flet/controls/material/segmented_button.py +20 -11
- flet/controls/material/selection_area.py +3 -3
- flet/controls/material/slider.py +10 -5
- flet/controls/material/snack_bar.py +9 -5
- flet/controls/material/switch.py +3 -3
- flet/controls/material/tabs.py +18 -14
- flet/controls/material/textfield.py +11 -6
- flet/controls/material/vertical_divider.py +12 -6
- flet/testing/flet_test_app.py +5 -1
- flet/version.py +1 -1
- {flet-0.70.0.dev6211.dist-info → flet-0.70.0.dev6232.dist-info}/METADATA +1 -1
- {flet-0.70.0.dev6211.dist-info → flet-0.70.0.dev6232.dist-info}/RECORD +63 -63
- {flet-0.70.0.dev6211.dist-info → flet-0.70.0.dev6232.dist-info}/WHEEL +0 -0
- {flet-0.70.0.dev6211.dist-info → flet-0.70.0.dev6232.dist-info}/entry_points.txt +0 -0
- {flet-0.70.0.dev6211.dist-info → flet-0.70.0.dev6232.dist-info}/top_level.txt +0 -0
flet/controls/base_control.py
CHANGED
|
@@ -60,7 +60,7 @@ def control(
|
|
|
60
60
|
isolated: If `True`, marks the control as isolated. An isolated control
|
|
61
61
|
is excluded from page updates when its parent control is updated.
|
|
62
62
|
post_init_args: Number of InitVar arguments to pass to __post_init__.
|
|
63
|
-
|
|
63
|
+
dataclass_kwargs: Additional keyword arguments passed to `@dataclass`.
|
|
64
64
|
|
|
65
65
|
Usage:
|
|
66
66
|
- Supports `@control` (without parentheses)
|
flet/controls/border.py
CHANGED
|
@@ -51,9 +51,6 @@ class BorderSide:
|
|
|
51
51
|
Creates the side of a border.
|
|
52
52
|
|
|
53
53
|
By default, the border is `1.0` logical pixels wide and solid black color.
|
|
54
|
-
|
|
55
|
-
Raises:
|
|
56
|
-
AssertionError: if [`width`][(c).] is negative.
|
|
57
54
|
"""
|
|
58
55
|
|
|
59
56
|
width: Number = 1.0
|
|
@@ -69,6 +66,9 @@ class BorderSide:
|
|
|
69
66
|
Tip:
|
|
70
67
|
To omit the border entirely, set the [`style`][(c).]
|
|
71
68
|
to [`BorderStyle.NONE`][flet.].
|
|
69
|
+
|
|
70
|
+
Raises:
|
|
71
|
+
AssertionError: If [`width`][(c).] is negative.
|
|
72
72
|
"""
|
|
73
73
|
|
|
74
74
|
color: ColorValue = Colors.BLACK
|
flet/controls/control.py
CHANGED
|
@@ -15,10 +15,6 @@ class Control(BaseControl):
|
|
|
15
15
|
Base class for controls.
|
|
16
16
|
|
|
17
17
|
Not meant to be used directly.
|
|
18
|
-
|
|
19
|
-
Raises:
|
|
20
|
-
ValueError: If [`opacity`][(c).] is not between `0.0` and `1.0` inclusive.
|
|
21
|
-
ValueError: If [`expand`][(c).] is not None and not of type `bool` or `int`.
|
|
22
18
|
"""
|
|
23
19
|
|
|
24
20
|
expand: Optional[Union[bool, int]] = None
|
|
@@ -33,6 +29,9 @@ class Control(BaseControl):
|
|
|
33
29
|
Has effect only if the direct parent of this control is one of the following
|
|
34
30
|
controls, or their subclasses: [`Column`][flet.], [`Row`][flet.],
|
|
35
31
|
[`View`][flet.], [`Page`][flet.].
|
|
32
|
+
|
|
33
|
+
Raises:
|
|
34
|
+
ValueError: If [`expand`][(c).] is not `None` and not of type `bool` or `int`.
|
|
36
35
|
"""
|
|
37
36
|
|
|
38
37
|
expand_loose: bool = False
|
|
@@ -83,6 +82,9 @@ class Control(BaseControl):
|
|
|
83
82
|
|
|
84
83
|
Value ranges from `0.0` (completely transparent) to `1.0` (completely opaque
|
|
85
84
|
without any transparency).
|
|
85
|
+
|
|
86
|
+
Raises:
|
|
87
|
+
ValueError: If [`opacity`][(c).] is not between `0.0` and `1.0` inclusive.
|
|
86
88
|
"""
|
|
87
89
|
|
|
88
90
|
tooltip: Optional[TooltipValue] = None
|
|
@@ -20,9 +20,6 @@ class AnimatedSwitcherTransition(Enum):
|
|
|
20
20
|
class AnimatedSwitcher(LayoutControl):
|
|
21
21
|
"""
|
|
22
22
|
Used to switch between controls with an animation.
|
|
23
|
-
|
|
24
|
-
Raises:
|
|
25
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
26
23
|
"""
|
|
27
24
|
|
|
28
25
|
content: Control
|
|
@@ -31,6 +28,9 @@ class AnimatedSwitcher(LayoutControl):
|
|
|
31
28
|
|
|
32
29
|
When it changes, this switcher will animate the transition from the old/previous
|
|
33
30
|
`content` to the new one.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
duration: DurationValue = field(default_factory=lambda: Duration(seconds=1))
|
|
@@ -84,14 +84,16 @@ class AutofillGroupDisposeAction(Enum):
|
|
|
84
84
|
class AutofillGroup(Control):
|
|
85
85
|
"""
|
|
86
86
|
Used to group autofill controls together.
|
|
87
|
-
|
|
88
|
-
Raises:
|
|
89
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
90
87
|
"""
|
|
91
88
|
|
|
92
89
|
content: Control
|
|
93
90
|
"""
|
|
94
91
|
The content of this group.
|
|
92
|
+
|
|
93
|
+
Must be visible.
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
95
97
|
"""
|
|
96
98
|
|
|
97
99
|
dispose_action: AutofillGroupDisposeAction = AutofillGroupDisposeAction.COMMIT
|
|
@@ -44,16 +44,16 @@ class Dismissible(LayoutControl, AdaptiveControl):
|
|
|
44
44
|
this control further animates its height (or width, depending on what is
|
|
45
45
|
perpendicular to the [`dismiss_direction`][(c).]), gradually reducing it to zero
|
|
46
46
|
over the specified [`resize_duration`][(c).].
|
|
47
|
-
|
|
48
|
-
Raises:
|
|
49
|
-
ValueError: If the [`content`][(c).] is not visible.
|
|
50
|
-
ValueError: If the [`secondary_background`][(c).] is provided and visible
|
|
51
|
-
but the [`background`][(c).] is not provided and visible.
|
|
52
47
|
"""
|
|
53
48
|
|
|
54
49
|
content: Control
|
|
55
50
|
"""
|
|
56
51
|
The control that is being dismissed.
|
|
52
|
+
|
|
53
|
+
Must be visible.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
ValueError: If the [`content`][(c).] is not visible.
|
|
57
57
|
"""
|
|
58
58
|
|
|
59
59
|
background: Optional[Control] = None
|
|
@@ -73,6 +73,10 @@ class Dismissible(LayoutControl, AdaptiveControl):
|
|
|
73
73
|
Note:
|
|
74
74
|
Can only be specified if [`background`][(c).] is also
|
|
75
75
|
specified/visible.
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
ValueError: If the [`secondary_background`][(c).] is provided and visible
|
|
79
|
+
but the [`background`][(c).] is not provided and visible.
|
|
76
80
|
"""
|
|
77
81
|
|
|
78
82
|
dismiss_direction: DismissDirection = DismissDirection.HORIZONTAL
|
|
@@ -57,14 +57,16 @@ class DragTarget(Control):
|
|
|
57
57
|
does drop the `Draggable` on top of the `DragTarget` (and the `DragTarget` has
|
|
58
58
|
indicated that it will accept the `Draggable`'s data), then the `DragTarget` is
|
|
59
59
|
asked to accept the `Draggable`'s data.
|
|
60
|
-
|
|
61
|
-
Raises:
|
|
62
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
63
60
|
"""
|
|
64
61
|
|
|
65
62
|
content: Control
|
|
66
63
|
"""
|
|
67
64
|
The content of this control.
|
|
65
|
+
|
|
66
|
+
Must be visible.
|
|
67
|
+
|
|
68
|
+
Raises:
|
|
69
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
68
70
|
"""
|
|
69
71
|
|
|
70
72
|
group: str = "default"
|
flet/controls/core/draggable.py
CHANGED
|
@@ -17,10 +17,6 @@ class Draggable(Control):
|
|
|
17
17
|
[`content_feedback`][(c).] control that tracks the user's finger across the screen.
|
|
18
18
|
If the user lifts their finger while on top of a `DragTarget`, this target is
|
|
19
19
|
given the opportunity to complete drag-and-drop flow.
|
|
20
|
-
|
|
21
|
-
Raises:
|
|
22
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
23
|
-
ValueError: If [`max_simultaneous_drags`][(c).] is set to a negative value.
|
|
24
20
|
"""
|
|
25
21
|
|
|
26
22
|
content: Control
|
|
@@ -29,6 +25,9 @@ class Draggable(Control):
|
|
|
29
25
|
|
|
30
26
|
If the draggable is being dragged, the
|
|
31
27
|
[`content_when_dragging`][(c).] is displayed instead.
|
|
28
|
+
|
|
29
|
+
Raises:
|
|
30
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
32
31
|
"""
|
|
33
32
|
|
|
34
33
|
group: str = "default"
|
|
@@ -87,6 +86,9 @@ class Draggable(Control):
|
|
|
87
86
|
to visually indicate the item is being moved.
|
|
88
87
|
- Set to any positive integer to allow that many concurrent drags.
|
|
89
88
|
- If `None`, there is no limit on the number of simultaneous drags.
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
ValueError: If [`max_simultaneous_drags`][(c).] is set to a negative value.
|
|
90
92
|
"""
|
|
91
93
|
|
|
92
94
|
on_drag_start: Optional[ControlEventHandler["Draggable"]] = None
|
flet/controls/core/icon.py
CHANGED
|
@@ -15,11 +15,6 @@ class Icon(LayoutControl):
|
|
|
15
15
|
|
|
16
16
|
Icons can be customized in color, size, and visual style using various
|
|
17
17
|
parameters such as stroke weight, fill level, and shadows.
|
|
18
|
-
|
|
19
|
-
Raises:
|
|
20
|
-
ValueError: If [`fill`][(c).] is less than `0.0` or greater than `1.0`.
|
|
21
|
-
ValueError: If [`weight`][(c).] is less than or equal to `0.0`.
|
|
22
|
-
ValueError: If [`optical_size`][(c).] is less than or equal to `0.0`.
|
|
23
18
|
"""
|
|
24
19
|
|
|
25
20
|
icon: IconData
|
|
@@ -65,6 +60,9 @@ class Icon(LayoutControl):
|
|
|
65
60
|
|
|
66
61
|
This feature requires the icon's font to support fill variation.
|
|
67
62
|
It can be used to indicate state transitions or selection visually.
|
|
63
|
+
|
|
64
|
+
Raises:
|
|
65
|
+
ValueError: If [`fill`][(c).] is less than `0.0` or greater than `1.0`.
|
|
68
66
|
"""
|
|
69
67
|
|
|
70
68
|
apply_text_scaling: Optional[bool] = None
|
|
@@ -90,6 +88,9 @@ class Icon(LayoutControl):
|
|
|
90
88
|
|
|
91
89
|
This requires the icon font to support weight variation.
|
|
92
90
|
Must be greater than `0`.
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
ValueError: If [`weight`][(c).] is less than or equal to `0.0`.
|
|
93
94
|
"""
|
|
94
95
|
|
|
95
96
|
optical_size: Optional[Number] = None
|
|
@@ -98,6 +99,9 @@ class Icon(LayoutControl):
|
|
|
98
99
|
|
|
99
100
|
This requires the icon font to support optical sizing.
|
|
100
101
|
Must be greater than `0`.
|
|
102
|
+
|
|
103
|
+
Raises:
|
|
104
|
+
ValueError: If [`optical_size`][(c).] is less than or equal to `0.0`.
|
|
101
105
|
"""
|
|
102
106
|
|
|
103
107
|
blend_mode: Optional[BlendMode] = BlendMode.SRC_OVER
|
|
@@ -21,19 +21,16 @@ __all__ = ["InteractiveViewer"]
|
|
|
21
21
|
class InteractiveViewer(LayoutControl):
|
|
22
22
|
"""
|
|
23
23
|
Allows you to pan, zoom, and rotate its [`content`][(c).].
|
|
24
|
-
|
|
25
|
-
Raises:
|
|
26
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
27
|
-
ValueError: If [`min_scale`][(c).] is not greater than `0`.
|
|
28
|
-
ValueError: If [`max_scale`][(c).] is not greater than `0`.
|
|
29
|
-
ValueError: If [`max_scale`][(c).] is less than `min_scale`.
|
|
30
|
-
ValueError: If [`interaction_end_friction_coefficient`][(c).] is not
|
|
31
|
-
greater than `0`.
|
|
32
24
|
"""
|
|
33
25
|
|
|
34
26
|
content: Control
|
|
35
27
|
"""
|
|
36
28
|
The `Control` to be transformed.
|
|
29
|
+
|
|
30
|
+
Must be visible.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
37
34
|
"""
|
|
38
35
|
|
|
39
36
|
pan_enabled: bool = True
|
|
@@ -63,6 +60,10 @@ class InteractiveViewer(LayoutControl):
|
|
|
63
60
|
|
|
64
61
|
Note:
|
|
65
62
|
Must be greater than or equal to [`min_scale`][(c).].
|
|
63
|
+
|
|
64
|
+
Raises:
|
|
65
|
+
ValueError: If [`max_scale`][(c).] is not greater than `0` or is less than
|
|
66
|
+
[`min_scale`][(c).].
|
|
66
67
|
""" # noqa: E501
|
|
67
68
|
|
|
68
69
|
min_scale: Number = 0.8
|
|
@@ -72,6 +73,9 @@ class InteractiveViewer(LayoutControl):
|
|
|
72
73
|
Note:
|
|
73
74
|
Must be greater than `0` and less than or equal
|
|
74
75
|
to [`max_scale`][(c).].
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
ValueError: If [`min_scale`][(c).] is not greater than `0`.
|
|
75
79
|
"""
|
|
76
80
|
|
|
77
81
|
interaction_end_friction_coefficient: Number = 0.0000135
|
|
@@ -80,6 +84,10 @@ class InteractiveViewer(LayoutControl):
|
|
|
80
84
|
|
|
81
85
|
Note:
|
|
82
86
|
Must be greater than `0`.
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
ValueError: If [`interaction_end_friction_coefficient`][(c).] is not greater
|
|
90
|
+
than `0`.
|
|
83
91
|
"""
|
|
84
92
|
|
|
85
93
|
scale_factor: Number = 200
|
flet/controls/core/pagelet.py
CHANGED
|
@@ -24,9 +24,6 @@ class Pagelet(LayoutControl, AdaptiveControl):
|
|
|
24
24
|
Use it for projects that require a "page within a page" layouts with its own
|
|
25
25
|
[`AppBar`][flet.], [`BottomAppBar`][flet.], [`NavigationDrawer`][flet.],
|
|
26
26
|
such as demos and galleries.
|
|
27
|
-
|
|
28
|
-
Raises:
|
|
29
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
30
27
|
"""
|
|
31
28
|
|
|
32
29
|
content: Control
|
|
@@ -35,6 +32,9 @@ class Pagelet(LayoutControl, AdaptiveControl):
|
|
|
35
32
|
|
|
36
33
|
The control in the content of the Pagelet is positioned at the top-left of the
|
|
37
34
|
available space between the app bar and the bottom of the Pagelet.
|
|
35
|
+
|
|
36
|
+
Raises:
|
|
37
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
40
|
appbar: Optional[Union[AppBar, CupertinoAppBar]] = None
|
|
@@ -11,9 +11,6 @@ class ReorderableDraggable(LayoutControl, AdaptiveControl):
|
|
|
11
11
|
|
|
12
12
|
It creates a listener for a drag immediately following a pointer down
|
|
13
13
|
event over the given [`content`][(c).] control.
|
|
14
|
-
|
|
15
|
-
Raises:
|
|
16
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
17
14
|
"""
|
|
18
15
|
|
|
19
16
|
index: int
|
|
@@ -25,6 +22,11 @@ class ReorderableDraggable(LayoutControl, AdaptiveControl):
|
|
|
25
22
|
"""
|
|
26
23
|
The control for which the application would like to respond to a tap and
|
|
27
24
|
drag gesture by starting a reordering drag on a reorderable list.
|
|
25
|
+
|
|
26
|
+
Must be visible.
|
|
27
|
+
|
|
28
|
+
Raises:
|
|
29
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
28
30
|
"""
|
|
29
31
|
|
|
30
32
|
def before_update(self):
|
flet/controls/core/safe_area.py
CHANGED
|
@@ -21,14 +21,16 @@ class SafeArea(LayoutControl, AdaptiveControl):
|
|
|
21
21
|
|
|
22
22
|
When a [`minimum_padding`][(c).] is specified, the greater of the minimum padding
|
|
23
23
|
or the safe area padding will be applied.
|
|
24
|
-
|
|
25
|
-
Raises:
|
|
26
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
27
24
|
"""
|
|
28
25
|
|
|
29
26
|
content: Control
|
|
30
27
|
"""
|
|
31
28
|
The control to display.
|
|
29
|
+
|
|
30
|
+
Must be visible.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
32
34
|
"""
|
|
33
35
|
|
|
34
36
|
avoid_intrusions_left: bool = True
|
flet/controls/core/text_span.py
CHANGED
|
@@ -18,9 +18,6 @@ class TextSpan(Control):
|
|
|
18
18
|
|
|
19
19
|
For the object to be useful, at least one of [`text`][(c).] or
|
|
20
20
|
[`spans`][(c).] should be set.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
ValueError: If [`semantics_label`][(c).] is set when [`text`][(c).] is `None`.
|
|
24
21
|
"""
|
|
25
22
|
|
|
26
23
|
text: Optional[str] = None
|
|
@@ -60,6 +57,9 @@ class TextSpan(Control):
|
|
|
60
57
|
|
|
61
58
|
If present, the semantics of this control will contain this value instead of the
|
|
62
59
|
actual text.
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
ValueError: If [`semantics_label`][(c).] is set when [`text`][(c).] is `None`.
|
|
63
63
|
"""
|
|
64
64
|
|
|
65
65
|
spell_out: Optional[bool] = None
|
|
@@ -13,9 +13,6 @@ class WindowDragArea(LayoutControl):
|
|
|
13
13
|
"""
|
|
14
14
|
It mimics the behavior (drag, move, maximize, restore) of a native OS window
|
|
15
15
|
title bar on the [`content`][(c).] control.
|
|
16
|
-
|
|
17
|
-
Raises:
|
|
18
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
19
16
|
"""
|
|
20
17
|
|
|
21
18
|
content: Control
|
|
@@ -23,6 +20,9 @@ class WindowDragArea(LayoutControl):
|
|
|
23
20
|
The content of this drag area.
|
|
24
21
|
|
|
25
22
|
Must be visible.
|
|
23
|
+
|
|
24
|
+
Raises:
|
|
25
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
maximizable: bool = True
|
|
@@ -15,10 +15,6 @@ class CupertinoActionSheet(LayoutControl):
|
|
|
15
15
|
|
|
16
16
|
Action sheets are generally used to give the user a choice between
|
|
17
17
|
two or more choices for the current context.
|
|
18
|
-
|
|
19
|
-
Raises:
|
|
20
|
-
ValueError: If none of [`actions`][(c).], [`title`][(c).], [`message`][(c).],
|
|
21
|
-
or [`cancel`][(c).] are provided.
|
|
22
18
|
"""
|
|
23
19
|
|
|
24
20
|
title: Optional[StrOrControl] = None
|
|
@@ -41,6 +37,10 @@ class CupertinoActionSheet(LayoutControl):
|
|
|
41
37
|
A list of action buttons to be shown in the sheet.
|
|
42
38
|
|
|
43
39
|
These actions are typically [`CupertinoActionSheetAction`][flet.]s.
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
ValueError: If none of [`actions`][(c).], [`title`][(c).], [`message`][(c).],
|
|
43
|
+
or [`cancel`][(c).] are provided.
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
cancel: Optional[Control] = None
|
|
@@ -12,14 +12,14 @@ __all__ = ["CupertinoActionSheetAction"]
|
|
|
12
12
|
class CupertinoActionSheetAction(LayoutControl):
|
|
13
13
|
"""
|
|
14
14
|
An action button typically used in a CupertinoActionSheet.
|
|
15
|
-
|
|
16
|
-
Raises:
|
|
17
|
-
ValueError: If [`content`][(c).] is neither a string nor a visible Control.
|
|
18
15
|
"""
|
|
19
16
|
|
|
20
17
|
content: StrOrControl
|
|
21
18
|
"""
|
|
22
19
|
The child control to be shown in this action button.
|
|
20
|
+
|
|
21
|
+
Raises:
|
|
22
|
+
ValueError: If [`content`][(c).] is neither a string nor a visible Control.
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
default: bool = False
|
|
@@ -11,9 +11,6 @@ __all__ = ["CupertinoActivityIndicator"]
|
|
|
11
11
|
class CupertinoActivityIndicator(LayoutControl):
|
|
12
12
|
"""
|
|
13
13
|
An iOS-style activity indicator that spins clockwise.
|
|
14
|
-
|
|
15
|
-
Raises:
|
|
16
|
-
ValueError: If [`radius`][(c).] is not strictly greater than `0`.
|
|
17
14
|
"""
|
|
18
15
|
|
|
19
16
|
radius: Number = 10
|
|
@@ -22,6 +19,9 @@ class CupertinoActivityIndicator(LayoutControl):
|
|
|
22
19
|
|
|
23
20
|
Note:
|
|
24
21
|
Must be strictly greater than `0`.
|
|
22
|
+
|
|
23
|
+
Raises:
|
|
24
|
+
ValueError: If [`radius`][(c).] is not strictly greater than `0`.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
color: Optional[ColorValue] = None
|
|
@@ -31,10 +31,6 @@ class CupertinoButtonSize(Enum):
|
|
|
31
31
|
class CupertinoButton(LayoutControl):
|
|
32
32
|
"""
|
|
33
33
|
An iOS-style button.
|
|
34
|
-
|
|
35
|
-
Raises:
|
|
36
|
-
ValueError: If [`opacity_on_click`][(c).] is not between `0.0`
|
|
37
|
-
and `1.0` inclusive.
|
|
38
34
|
"""
|
|
39
35
|
|
|
40
36
|
content: Optional[StrOrControl] = None
|
|
@@ -72,6 +68,10 @@ class CupertinoButton(LayoutControl):
|
|
|
72
68
|
Defines the opacity of the button when it is clicked.
|
|
73
69
|
|
|
74
70
|
When not pressed, the button has an opacity of `1.0`.
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
ValueError: If [`opacity_on_click`][(c).] is not between `0.0`
|
|
74
|
+
and `1.0` inclusive.
|
|
75
75
|
"""
|
|
76
76
|
|
|
77
77
|
min_size: Optional[Size] = None
|
|
@@ -9,10 +9,6 @@ __all__ = ["CupertinoContextMenu"]
|
|
|
9
9
|
class CupertinoContextMenu(AdaptiveControl):
|
|
10
10
|
"""
|
|
11
11
|
A full-screen modal route that opens up when the [`content`][(c).] is long-pressed.
|
|
12
|
-
|
|
13
|
-
Raises:
|
|
14
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
15
|
-
ValueError: If [`actions`][(c).] does not contain at least one visible action.
|
|
16
12
|
"""
|
|
17
13
|
|
|
18
14
|
content: Control
|
|
@@ -23,6 +19,9 @@ class CupertinoContextMenu(AdaptiveControl):
|
|
|
23
19
|
When this context menu is long-pressed, the menu will open and this control
|
|
24
20
|
will be moved to the new route and be expanded. This allows the content
|
|
25
21
|
to resize to fit in its place in the new route, if it doesn't size itself.
|
|
22
|
+
|
|
23
|
+
Raises:
|
|
24
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
26
25
|
"""
|
|
27
26
|
|
|
28
27
|
actions: list[Control]
|
|
@@ -33,6 +32,9 @@ class CupertinoContextMenu(AdaptiveControl):
|
|
|
33
32
|
|
|
34
33
|
Note:
|
|
35
34
|
This list must have at least one visible action.
|
|
35
|
+
|
|
36
|
+
Raises:
|
|
37
|
+
ValueError: If [`actions`][(c).] does not contain at least one visible action.
|
|
36
38
|
"""
|
|
37
39
|
|
|
38
40
|
enable_haptic_feedback: bool = True
|
|
@@ -14,14 +14,14 @@ class CupertinoContextMenuAction(AdaptiveControl):
|
|
|
14
14
|
A cupertino context menu action.
|
|
15
15
|
|
|
16
16
|
Typically used as a child of [`CupertinoContextMenu.actions`][flet.].
|
|
17
|
-
|
|
18
|
-
Raises:
|
|
19
|
-
ValueError: If [`content`][(c).] is neither a string nor a visible Control.
|
|
20
17
|
"""
|
|
21
18
|
|
|
22
19
|
content: StrOrControl
|
|
23
20
|
"""
|
|
24
21
|
The content of this action button.
|
|
22
|
+
|
|
23
|
+
Raises:
|
|
24
|
+
ValueError: If [`content`][(c).] is neither a string nor a visible Control.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
default: bool = False
|
|
@@ -34,15 +34,6 @@ class CupertinoDatePickerDateOrder(Enum):
|
|
|
34
34
|
class CupertinoDatePicker(LayoutControl):
|
|
35
35
|
"""
|
|
36
36
|
An iOS-styled date picker.
|
|
37
|
-
|
|
38
|
-
Raises:
|
|
39
|
-
ValueError: If [`item_extent`][(c).] is not strictly greater than `0`.
|
|
40
|
-
ValueError: If [`minute_interval`][(c).] is not a positive integer
|
|
41
|
-
factor of `60`.
|
|
42
|
-
ValueError: If [`value`][(c).] is before [`first_date`][(c).] or
|
|
43
|
-
after [`last_date`][(c).].
|
|
44
|
-
ValueError: If [`value`][(c).] year is less than [`minimum_year`][(c).] or
|
|
45
|
-
greater than [`maximum_year`][(c).].
|
|
46
37
|
"""
|
|
47
38
|
|
|
48
39
|
value: DateTimeValue = field(default_factory=lambda: datetime.now())
|
|
@@ -54,6 +45,14 @@ class CupertinoDatePicker(LayoutControl):
|
|
|
54
45
|
else a `ValueError` will be raised.
|
|
55
46
|
|
|
56
47
|
Defaults to the present date and time.
|
|
48
|
+
|
|
49
|
+
Raises:
|
|
50
|
+
ValueError: If [`value`][(c).] is before [`first_date`][(c).] or
|
|
51
|
+
after [`last_date`][(c).].
|
|
52
|
+
ValueError: If [`value`][(c).] year is less than [`minimum_year`][(c).] or
|
|
53
|
+
greater than [`maximum_year`][(c).].
|
|
54
|
+
ValueError: If [`value`][(c).] minute is not divisible by
|
|
55
|
+
[`minute_interval`][(c).].
|
|
57
56
|
"""
|
|
58
57
|
|
|
59
58
|
first_date: Optional[DateTimeValue] = None
|
|
@@ -100,12 +99,19 @@ class CupertinoDatePicker(LayoutControl):
|
|
|
100
99
|
|
|
101
100
|
Note:
|
|
102
101
|
Must be an integer factor of `60`.
|
|
102
|
+
|
|
103
|
+
Raises:
|
|
104
|
+
ValueError: If [`minute_interval`][(c).] is not a positive integer factor of
|
|
105
|
+
`60`.
|
|
103
106
|
"""
|
|
104
107
|
|
|
105
108
|
minimum_year: int = 1
|
|
106
109
|
"""
|
|
107
110
|
Minimum year to which the picker can be scrolled when in
|
|
108
111
|
[`CupertinoDatePickerMode.DATE`][flet.] mode.
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
ValueError: If [`value`][(c).] year is less than [`minimum_year`][(c).].
|
|
109
115
|
"""
|
|
110
116
|
|
|
111
117
|
maximum_year: Optional[int] = None
|
|
@@ -114,11 +120,17 @@ class CupertinoDatePicker(LayoutControl):
|
|
|
114
120
|
[`CupertinoDatePickerMode.DATE`][flet.] mode.
|
|
115
121
|
|
|
116
122
|
Defaults to `None` - no limit.
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
ValueError: If [`value`][(c).] year is greater than [`maximum_year`][(c).].
|
|
117
126
|
"""
|
|
118
127
|
|
|
119
128
|
item_extent: Number = 32.0
|
|
120
129
|
"""
|
|
121
130
|
The uniform height of all children.
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
ValueError: If [`item_extent`][(c).] is not strictly greater than `0`.
|
|
122
134
|
"""
|
|
123
135
|
|
|
124
136
|
use_24h_format: bool = False
|
|
@@ -131,6 +143,11 @@ class CupertinoDatePicker(LayoutControl):
|
|
|
131
143
|
show_day_of_week: bool = False
|
|
132
144
|
"""
|
|
133
145
|
Whether to show day of week alongside day.
|
|
146
|
+
|
|
147
|
+
Raises:
|
|
148
|
+
ValueError: If [`show_day_of_week`][(c).] is set when
|
|
149
|
+
[`date_picker_mode`][(c).] is not
|
|
150
|
+
[`CupertinoDatePickerMode.DATE`][flet.].
|
|
134
151
|
"""
|
|
135
152
|
|
|
136
153
|
date_picker_mode: CupertinoDatePickerMode = CupertinoDatePickerMode.DATE_AND_TIME
|
|
@@ -15,14 +15,14 @@ class CupertinoDialogAction(Control):
|
|
|
15
15
|
A dialog action button.
|
|
16
16
|
|
|
17
17
|
Typically used as a child of [`CupertinoAlertDialog.actions`][flet.].
|
|
18
|
-
|
|
19
|
-
Raises:
|
|
20
|
-
ValueError: If [`content`][(c).] is neither a string nor a visible Control.
|
|
21
18
|
"""
|
|
22
19
|
|
|
23
20
|
content: StrOrControl
|
|
24
21
|
"""
|
|
25
22
|
The content of this action button.
|
|
23
|
+
|
|
24
|
+
Raises:
|
|
25
|
+
ValueError: If [`content`][(c).] is neither a string nor a visible Control.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
default: bool = False
|
|
@@ -21,9 +21,6 @@ class CupertinoListTile(LayoutControl):
|
|
|
21
21
|
An iOS-style list tile.
|
|
22
22
|
|
|
23
23
|
Can also serve as a cupertino equivalent of the Material [`ListTile`][flet.].
|
|
24
|
-
|
|
25
|
-
Raises:
|
|
26
|
-
ValueError: If [`title`][(c).] is neither a string nor a visible Control.
|
|
27
24
|
"""
|
|
28
25
|
|
|
29
26
|
title: StrOrControl
|
|
@@ -31,6 +28,9 @@ class CupertinoListTile(LayoutControl):
|
|
|
31
28
|
The primary content of this list tile.
|
|
32
29
|
|
|
33
30
|
Typically a [`Text`][flet.] control.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`title`][(c).] is neither a string nor a visible Control.
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
subtitle: Optional[StrOrControl] = None
|
|
@@ -21,11 +21,6 @@ class CupertinoNavigationBar(LayoutControl):
|
|
|
21
21
|
|
|
22
22
|
Navigation bars offer a persistent and convenient way to switch between primary
|
|
23
23
|
destinations in an app.
|
|
24
|
-
|
|
25
|
-
Raises:
|
|
26
|
-
ValueError: If [`destinations`][(c).] does not contain at least two visible
|
|
27
|
-
[`NavigationBarDestination`][flet.]s.
|
|
28
|
-
IndexError: If [`selected_index`][(c).] is out of range.
|
|
29
24
|
"""
|
|
30
25
|
|
|
31
26
|
destinations: list[NavigationBarDestination]
|
|
@@ -34,6 +29,10 @@ class CupertinoNavigationBar(LayoutControl):
|
|
|
34
29
|
|
|
35
30
|
Note:
|
|
36
31
|
Must be a list of two or more [`NavigationBarDestination`][flet.]s.
|
|
32
|
+
|
|
33
|
+
Raises:
|
|
34
|
+
ValueError: If [`destinations`][(c).] does not contain at least two visible
|
|
35
|
+
[`NavigationBarDestination`][flet.]s.
|
|
37
36
|
"""
|
|
38
37
|
|
|
39
38
|
selected_index: int = 0
|
|
@@ -44,6 +43,10 @@ class CupertinoNavigationBar(LayoutControl):
|
|
|
44
43
|
Note:
|
|
45
44
|
Must be a value between `0` and the length of visible
|
|
46
45
|
[`destinations`][(c).], inclusive.
|
|
46
|
+
|
|
47
|
+
Raises:
|
|
48
|
+
IndexError: If [`selected_index`][(c).] is out of range relative to the
|
|
49
|
+
visible destinations.
|
|
47
50
|
"""
|
|
48
51
|
|
|
49
52
|
bgcolor: Optional[ColorValue] = None
|