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
|
@@ -18,10 +18,6 @@ __all__ = ["CupertinoPicker"]
|
|
|
18
18
|
class CupertinoPicker(LayoutControl):
|
|
19
19
|
"""
|
|
20
20
|
An iOS-styled picker.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
ValueError: If [`item_extent`][(c).], [`squeeze`][(c).],
|
|
24
|
-
or [`magnification`][(c).] is not strictly greater than `0.0`.
|
|
25
21
|
"""
|
|
26
22
|
|
|
27
23
|
controls: list[Control] = field(default_factory=list)
|
|
@@ -32,6 +28,9 @@ class CupertinoPicker(LayoutControl):
|
|
|
32
28
|
item_extent: Number = 32.0
|
|
33
29
|
"""
|
|
34
30
|
The uniform height of all [`controls`][(c).].
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`item_extent`][(c).] is not strictly greater than `0.0`.
|
|
35
34
|
"""
|
|
36
35
|
|
|
37
36
|
selected_index: int = 0
|
|
@@ -64,11 +63,17 @@ class CupertinoPicker(LayoutControl):
|
|
|
64
63
|
|
|
65
64
|
Note:
|
|
66
65
|
Has effect only if [`use_magnifier`][(c).] is `True`.
|
|
66
|
+
|
|
67
|
+
Raises:
|
|
68
|
+
ValueError: If [`magnification`][(c).] is not strictly greater than `0.0`.
|
|
67
69
|
"""
|
|
68
70
|
|
|
69
71
|
squeeze: Number = 1.45
|
|
70
72
|
"""
|
|
71
73
|
The angular compactness of the children on the wheel.
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
ValueError: If [`squeeze`][(c).] is not strictly greater than `0.0`.
|
|
72
77
|
"""
|
|
73
78
|
|
|
74
79
|
diameter_ratio: Number = 1.07
|
|
@@ -14,11 +14,6 @@ __all__ = ["CupertinoSegmentedButton"]
|
|
|
14
14
|
class CupertinoSegmentedButton(LayoutControl):
|
|
15
15
|
"""
|
|
16
16
|
An iOS-style segmented button.
|
|
17
|
-
|
|
18
|
-
Raises:
|
|
19
|
-
ValueError: If [`controls`][(c).] does not contain at least two visible
|
|
20
|
-
controls.
|
|
21
|
-
IndexError: If [`selected_index`][(c).] is out of range.
|
|
22
17
|
"""
|
|
23
18
|
|
|
24
19
|
controls: list[Control]
|
|
@@ -27,12 +22,20 @@ class CupertinoSegmentedButton(LayoutControl):
|
|
|
27
22
|
|
|
28
23
|
Note:
|
|
29
24
|
Must contain at least two visible Controls.
|
|
25
|
+
|
|
26
|
+
Raises:
|
|
27
|
+
ValueError: If [`controls`][(c).] does not contain at least two visible
|
|
28
|
+
controls.
|
|
30
29
|
"""
|
|
31
30
|
|
|
32
31
|
selected_index: int = 0
|
|
33
32
|
"""
|
|
34
33
|
The index (starting from 0) of the selected segment in the
|
|
35
34
|
[`controls`][(c).] list.
|
|
35
|
+
|
|
36
|
+
Raises:
|
|
37
|
+
IndexError: If [`selected_index`][(c).] is out of range relative to the
|
|
38
|
+
visible controls.
|
|
36
39
|
"""
|
|
37
40
|
|
|
38
41
|
selected_color: Optional[ColorValue] = None
|
|
@@ -22,11 +22,6 @@ class CupertinoSlider(LayoutControl):
|
|
|
22
22
|
Use a slider when you want people to set defined values (such as volume or
|
|
23
23
|
brightness), or when people would benefit from instant feedback on the effect of
|
|
24
24
|
setting changes.
|
|
25
|
-
|
|
26
|
-
Raises:
|
|
27
|
-
ValueError: If [`min`][(c).] is greater than [`max`][(c).].
|
|
28
|
-
ValueError: If [`value`][(c).] is less than [`min`][(c).].
|
|
29
|
-
ValueError: If [`value`][(c).] is greater than [`max`][(c).].
|
|
30
25
|
"""
|
|
31
26
|
|
|
32
27
|
value: Optional[Number] = None
|
|
@@ -34,6 +29,10 @@ class CupertinoSlider(LayoutControl):
|
|
|
34
29
|
The currently selected value for this slider.
|
|
35
30
|
|
|
36
31
|
The slider's thumb is drawn at a position that corresponds to this value.
|
|
32
|
+
|
|
33
|
+
Raises:
|
|
34
|
+
ValueError: If [`value`][(c).] is less than [`min`][(c).] or greater than
|
|
35
|
+
[`max`][(c).].
|
|
37
36
|
"""
|
|
38
37
|
|
|
39
38
|
min: Number = 0.0
|
|
@@ -43,6 +42,9 @@ class CupertinoSlider(LayoutControl):
|
|
|
43
42
|
Note:
|
|
44
43
|
- Must be less than or equal to [`max`][(c).].
|
|
45
44
|
- If the [`max`][(c).] is equal to the `min`, then this slider is disabled.
|
|
45
|
+
|
|
46
|
+
Raises:
|
|
47
|
+
ValueError: If [`min`][(c).] is greater than [`max`][(c).].
|
|
46
48
|
"""
|
|
47
49
|
|
|
48
50
|
max: Number = 1.0
|
|
@@ -52,6 +54,9 @@ class CupertinoSlider(LayoutControl):
|
|
|
52
54
|
Note:
|
|
53
55
|
- Must be greater than or equal to [`min`][(c).].
|
|
54
56
|
- If the [`min`][(c).] is equal to the `max`, then this slider is disabled.
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
ValueError: If [`max`][(c).] is less than [`min`][(c).].
|
|
55
60
|
"""
|
|
56
61
|
|
|
57
62
|
divisions: Optional[int] = None
|
|
@@ -18,11 +18,6 @@ __all__ = ["CupertinoSlidingSegmentedButton"]
|
|
|
18
18
|
class CupertinoSlidingSegmentedButton(LayoutControl):
|
|
19
19
|
"""
|
|
20
20
|
A cupertino sliding segmented button.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
ValueError: If [`controls`][(c).] does not contain at least two
|
|
24
|
-
visible controls.
|
|
25
|
-
IndexError: If [`selected_index`][(c).] is out of range.
|
|
26
21
|
"""
|
|
27
22
|
|
|
28
23
|
controls: list[Control]
|
|
@@ -31,11 +26,19 @@ class CupertinoSlidingSegmentedButton(LayoutControl):
|
|
|
31
26
|
|
|
32
27
|
Note:
|
|
33
28
|
Must contain at least two visible Controls.
|
|
29
|
+
|
|
30
|
+
Raises:
|
|
31
|
+
ValueError: If [`controls`][(c).] does not contain at least two
|
|
32
|
+
visible controls.
|
|
34
33
|
"""
|
|
35
34
|
|
|
36
35
|
selected_index: int = 0
|
|
37
36
|
"""
|
|
38
37
|
The index (starting from 0) of the selected segment in the [`controls`][(c).] list.
|
|
38
|
+
|
|
39
|
+
Raises:
|
|
40
|
+
IndexError: If [`selected_index`][(c).] is out of range relative to the
|
|
41
|
+
visible controls.
|
|
39
42
|
"""
|
|
40
43
|
|
|
41
44
|
bgcolor: ColorValue = CupertinoColors.TERTIARY_SYSTEM_FILL
|
|
@@ -25,19 +25,6 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
25
25
|
|
|
26
26
|
It can show a countdown duration with hour, minute and second spinners. The
|
|
27
27
|
duration is bound between `0` and `23` hours `59` minutes `59` seconds.
|
|
28
|
-
|
|
29
|
-
Raises:
|
|
30
|
-
ValueError: If [`value`][(c).] is negative.
|
|
31
|
-
ValueError: If [`value`][(c).] is 24 hours or more.
|
|
32
|
-
ValueError: If [`minute_interval`][(c).] is not a positive integer
|
|
33
|
-
factor of `60`.
|
|
34
|
-
ValueError: If [`second_interval`][(c).] is not a positive integer
|
|
35
|
-
factor of `60`.
|
|
36
|
-
ValueError: If [`value`][(c).] is not a multiple
|
|
37
|
-
of [`minute_interval`][(c).].
|
|
38
|
-
ValueError: If [`value`][(c).] is not a multiple
|
|
39
|
-
of [`second_interval`][(c).].
|
|
40
|
-
ValueError: If [`item_extent`][(c).] is not strictly greater than `0.0`.
|
|
41
28
|
"""
|
|
42
29
|
|
|
43
30
|
value: DurationValue = field(default_factory=lambda: Duration())
|
|
@@ -45,6 +32,11 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
45
32
|
The initial duration of the countdown timer.
|
|
46
33
|
|
|
47
34
|
If specified as an integer, it will be assumed to be in seconds.
|
|
35
|
+
|
|
36
|
+
Raises:
|
|
37
|
+
ValueError: If [`value`][(c).] is negative or 24 hours or more.
|
|
38
|
+
ValueError: If [`value`][(c).] is not a multiple
|
|
39
|
+
of [`minute_interval`][(c).] or [`second_interval`][(c).].
|
|
48
40
|
"""
|
|
49
41
|
|
|
50
42
|
alignment: Alignment = field(default_factory=lambda: Alignment.CENTER)
|
|
@@ -58,6 +50,10 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
58
50
|
|
|
59
51
|
Note:
|
|
60
52
|
Must be a positive integer factor of `60`.
|
|
53
|
+
|
|
54
|
+
Raises:
|
|
55
|
+
ValueError: If [`second_interval`][(c).] is not a positive integer factor of
|
|
56
|
+
`60`.
|
|
61
57
|
"""
|
|
62
58
|
|
|
63
59
|
minute_interval: int = 1
|
|
@@ -66,6 +62,10 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
66
62
|
|
|
67
63
|
Note:
|
|
68
64
|
Must be a positive integer factor of `60`.
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
ValueError: If [`minute_interval`][(c).] is not a positive integer factor of
|
|
68
|
+
`60`.
|
|
69
69
|
"""
|
|
70
70
|
|
|
71
71
|
mode: CupertinoTimerPickerMode = CupertinoTimerPickerMode.HOUR_MINUTE_SECONDS
|
|
@@ -81,6 +81,9 @@ class CupertinoTimerPicker(LayoutControl):
|
|
|
81
81
|
item_extent: Number = 32.0
|
|
82
82
|
"""
|
|
83
83
|
The uniform height of all children.
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
ValueError: If [`item_extent`][(c).] is not strictly greater than `0.0`.
|
|
84
87
|
"""
|
|
85
88
|
|
|
86
89
|
on_change: Optional[ControlEventHandler["CupertinoTimerPicker"]] = None
|
|
@@ -27,10 +27,6 @@ class AlertDialog(DialogControl):
|
|
|
27
27
|
It has an optional [`title`][(c).] and an optional list of [`actions`][(c).] . The
|
|
28
28
|
`title` is displayed above the [`content`][(c).] and the `actions` are displayed
|
|
29
29
|
below the `content`.
|
|
30
|
-
|
|
31
|
-
Raises:
|
|
32
|
-
ValueError: If none of [`title`][(c).], [`content`][(c).], or
|
|
33
|
-
[`actions`][(c).] are provided, as the dialog would have nothing to display.
|
|
34
30
|
"""
|
|
35
31
|
|
|
36
32
|
content: Optional[Control] = None
|
|
@@ -59,6 +55,10 @@ class AlertDialog(DialogControl):
|
|
|
59
55
|
A set of actions that are displayed at the bottom of this dialog.
|
|
60
56
|
|
|
61
57
|
Typically this is a list of [`TextButton`][flet.] controls.
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
ValueError: If none of [`title`][(c).], [`content`][(c).], or
|
|
61
|
+
[`actions`][(c).] are provided, as the dialog would have nothing to display.
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
64
|
bgcolor: Optional[ColorValue] = None
|
|
@@ -18,12 +18,6 @@ from flet.controls.types import (
|
|
|
18
18
|
class AppBar(AdaptiveControl):
|
|
19
19
|
"""
|
|
20
20
|
A material design app bar.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
ValueError: If [`elevation`][(c).] is negative.
|
|
24
|
-
ValueError: If [`elevation_on_scroll`][(c).] is negative.
|
|
25
|
-
ValueError: If [`toolbar_opacity`][(c).] is not between `0.0`
|
|
26
|
-
and `1.0` inclusive.
|
|
27
21
|
"""
|
|
28
22
|
|
|
29
23
|
leading: Optional[Control] = None
|
|
@@ -95,11 +89,17 @@ class AppBar(AdaptiveControl):
|
|
|
95
89
|
Note:
|
|
96
90
|
This effect is only visible when using the Material 2 design
|
|
97
91
|
(when [`Theme.use_material3`][flet.] is `False`).
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
ValueError: If [`elevation`][(c).] is negative.
|
|
98
95
|
"""
|
|
99
96
|
|
|
100
97
|
elevation_on_scroll: Optional[Number] = None
|
|
101
98
|
"""
|
|
102
99
|
The elevation to be used if this app bar has something scrolled underneath it.
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
ValueError: If [`elevation_on_scroll`][(c).] is negative.
|
|
103
103
|
"""
|
|
104
104
|
|
|
105
105
|
shadow_color: Optional[ColorValue] = None
|
|
@@ -173,6 +173,10 @@ class AppBar(AdaptiveControl):
|
|
|
173
173
|
|
|
174
174
|
Note:
|
|
175
175
|
Must be in the range `0.0` (transparent) to `1.0` (fully opaque).
|
|
176
|
+
|
|
177
|
+
Raises:
|
|
178
|
+
ValueError: If [`toolbar_opacity`][(c).] is not between `0.0`
|
|
179
|
+
and `1.0` inclusive.
|
|
176
180
|
"""
|
|
177
181
|
|
|
178
182
|
title_text_style: Optional[TextStyle] = None
|
flet/controls/material/banner.py
CHANGED
|
@@ -26,12 +26,6 @@ class Banner(DialogControl):
|
|
|
26
26
|
Banners are displayed at the top of the screen, below a top app bar. They are
|
|
27
27
|
persistent and non-modal, allowing the user to either ignore them or interact with
|
|
28
28
|
them at any time.
|
|
29
|
-
|
|
30
|
-
Raises:
|
|
31
|
-
ValueError: if [`content`][(c).] is not visible.
|
|
32
|
-
ValueError: if [`elevation`][(c).] is negative.
|
|
33
|
-
ValueError: if [`actions`][(c).] does not contain at least one visible
|
|
34
|
-
action Control.
|
|
35
29
|
"""
|
|
36
30
|
|
|
37
31
|
content: StrOrControl
|
|
@@ -39,6 +33,9 @@ class Banner(DialogControl):
|
|
|
39
33
|
The content of this banner.
|
|
40
34
|
|
|
41
35
|
Typically a [`Text`][flet.] control.
|
|
36
|
+
|
|
37
|
+
Raises:
|
|
38
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
42
39
|
"""
|
|
43
40
|
|
|
44
41
|
actions: list[Control]
|
|
@@ -47,6 +44,10 @@ class Banner(DialogControl):
|
|
|
47
44
|
|
|
48
45
|
Typically this is a list of [`TextButton`][flet.]
|
|
49
46
|
controls.
|
|
47
|
+
|
|
48
|
+
Raises:
|
|
49
|
+
ValueError: If [`actions`][(c).] does not contain at least one visible
|
|
50
|
+
action Control.
|
|
50
51
|
"""
|
|
51
52
|
|
|
52
53
|
leading: Optional[IconDataOrControl] = None
|
|
@@ -104,6 +105,9 @@ class Banner(DialogControl):
|
|
|
104
105
|
elevation: Optional[Number] = None
|
|
105
106
|
"""
|
|
106
107
|
The elevation of this banner.
|
|
108
|
+
|
|
109
|
+
Raises:
|
|
110
|
+
ValueError: If [`elevation`][(c).] is negative.
|
|
107
111
|
"""
|
|
108
112
|
|
|
109
113
|
margin: Optional[MarginValue] = None
|
|
@@ -18,9 +18,6 @@ __all__ = ["BottomAppBar"]
|
|
|
18
18
|
class BottomAppBar(LayoutControl):
|
|
19
19
|
"""
|
|
20
20
|
A material design bottom app bar.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
ValueError: If [`elevation`][(c).] is negative.
|
|
24
21
|
"""
|
|
25
22
|
|
|
26
23
|
content: Optional[Control] = None
|
|
@@ -70,6 +67,9 @@ class BottomAppBar(LayoutControl):
|
|
|
70
67
|
elevation: Optional[Number] = None
|
|
71
68
|
"""
|
|
72
69
|
This property controls the size of the shadow below this app bar.
|
|
70
|
+
|
|
71
|
+
Raises:
|
|
72
|
+
ValueError: If [`elevation`][(c).] is negative.
|
|
73
73
|
"""
|
|
74
74
|
|
|
75
75
|
def before_update(self):
|
|
@@ -18,9 +18,6 @@ class BottomSheet(DialogControl):
|
|
|
18
18
|
|
|
19
19
|
A bottom sheet is an alternative to a menu or dialog and prevents the user
|
|
20
20
|
from interacting with the rest of the app.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
ValueError: If [`elevation`][(c).] is negative.
|
|
24
21
|
"""
|
|
25
22
|
|
|
26
23
|
content: Control
|
|
@@ -31,6 +28,9 @@ class BottomSheet(DialogControl):
|
|
|
31
28
|
elevation: Optional[Number] = None
|
|
32
29
|
"""
|
|
33
30
|
Defines the size of the shadow below this bottom sheet.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`elevation`][(c).] is negative.
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
bgcolor: Optional[ColorValue] = None
|
flet/controls/material/chip.py
CHANGED
|
@@ -26,12 +26,6 @@ __all__ = ["Chip"]
|
|
|
26
26
|
class Chip(LayoutControl):
|
|
27
27
|
"""
|
|
28
28
|
Chips are compact elements that represent an attribute, text, entity, or action.
|
|
29
|
-
|
|
30
|
-
Raises:
|
|
31
|
-
ValueError: If [`elevation`][(c).] or [`elevation_on_click`][(c).] is
|
|
32
|
-
negative.
|
|
33
|
-
ValueError: If callback for both [`on_click`][(c).] and [`on_select`][(c).]
|
|
34
|
-
are specified.
|
|
35
29
|
"""
|
|
36
30
|
|
|
37
31
|
label: StrOrControl
|
|
@@ -64,6 +58,9 @@ class Chip(LayoutControl):
|
|
|
64
58
|
A non-negative value which defines the size of the shadow below this chip.
|
|
65
59
|
|
|
66
60
|
Defaults to `0`.
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
ValueError: If [`elevation`][(c).] is negative.
|
|
67
64
|
"""
|
|
68
65
|
|
|
69
66
|
bgcolor: Optional[ColorValue] = None
|
|
@@ -166,6 +163,9 @@ class Chip(LayoutControl):
|
|
|
166
163
|
|
|
167
164
|
Note:
|
|
168
165
|
Must be non-negative.
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
ValueError: If [`elevation_on_click`][(c).] is negative.
|
|
169
169
|
"""
|
|
170
170
|
|
|
171
171
|
clip_behavior: ClipBehavior = ClipBehavior.NONE
|
|
@@ -225,6 +225,10 @@ class Chip(LayoutControl):
|
|
|
225
225
|
|
|
226
226
|
Note:
|
|
227
227
|
Cannot be specified together with [`on_select`][(c).].
|
|
228
|
+
|
|
229
|
+
Raises:
|
|
230
|
+
ValueError: If both [`on_click`][(c).] and [`on_select`][(c).] callbacks
|
|
231
|
+
are provided.
|
|
228
232
|
"""
|
|
229
233
|
|
|
230
234
|
on_delete: Optional[ControlEventHandler["Chip"]] = None
|
|
@@ -19,12 +19,6 @@ class CircleAvatar(LayoutControl):
|
|
|
19
19
|
|
|
20
20
|
If [`foreground_image_src`][(c).] fails then [`background_image_src`][(c).] is used,
|
|
21
21
|
and if this also fails, then [`bgcolor`][(c).] is used.
|
|
22
|
-
|
|
23
|
-
Raises:
|
|
24
|
-
ValueError: If [`radius`][(c).] or [`min_radius`][(c).]
|
|
25
|
-
or [`max_radius`][(c).] is negative.
|
|
26
|
-
ValueError: If [`radius`][(c).] is set and [`min_radius`][(c).]
|
|
27
|
-
or [`max_radius`][(c).] is not None.
|
|
28
22
|
"""
|
|
29
23
|
|
|
30
24
|
content: Optional[StrOrControl] = None
|
|
@@ -75,6 +69,11 @@ class CircleAvatar(LayoutControl):
|
|
|
75
69
|
The size of the avatar, expressed as the radius (half the diameter). If `radius` is
|
|
76
70
|
specified, then neither [`min_radius`][(c).] nor
|
|
77
71
|
[`max_radius`][(c).] may be specified.
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
ValueError: If [`radius`][(c).] is negative.
|
|
75
|
+
ValueError: If [`radius`][(c).] is set while [`min_radius`][(c).]
|
|
76
|
+
or [`max_radius`][(c).] is provided.
|
|
78
77
|
"""
|
|
79
78
|
|
|
80
79
|
min_radius: Optional[Number] = None
|
|
@@ -83,6 +82,9 @@ class CircleAvatar(LayoutControl):
|
|
|
83
82
|
`min_radius` is specified, then [`radius`][(c).] should not be specified.
|
|
84
83
|
|
|
85
84
|
Defaults to `0.0`.
|
|
85
|
+
|
|
86
|
+
Raises:
|
|
87
|
+
ValueError: If [`min_radius`][(c).] is negative.
|
|
86
88
|
"""
|
|
87
89
|
|
|
88
90
|
max_radius: Optional[Number] = None
|
|
@@ -93,6 +95,10 @@ class CircleAvatar(LayoutControl):
|
|
|
93
95
|
|
|
94
96
|
Note:
|
|
95
97
|
If `max_radius` is specified, then [`radius`][(c).] should not be specified.
|
|
98
|
+
|
|
99
|
+
Raises:
|
|
100
|
+
ValueError: If [`max_radius`][(c).] is negative.
|
|
101
|
+
ValueError: If [`max_radius`][(c).] is provided while [`radius`][(c).] is set.
|
|
96
102
|
"""
|
|
97
103
|
|
|
98
104
|
on_image_error: Optional[ControlEventHandler["CircleAvatar"]] = None
|
|
@@ -34,10 +34,6 @@ class DataColumnSortEvent(Event["DataColumn"]):
|
|
|
34
34
|
class DataColumn(Control):
|
|
35
35
|
"""
|
|
36
36
|
Column configuration for a [`DataTable`][flet.].
|
|
37
|
-
|
|
38
|
-
Raises:
|
|
39
|
-
ValueError: If the [`label`][(c).] is neither a string nor
|
|
40
|
-
a visible control.
|
|
41
37
|
"""
|
|
42
38
|
|
|
43
39
|
label: StrOrControl
|
|
@@ -47,6 +43,10 @@ class DataColumn(Control):
|
|
|
47
43
|
Typically, this will be a [`Text`][flet.] control.
|
|
48
44
|
It could also be an [`Icon`][flet.] (typically using size 18),
|
|
49
45
|
or a combination of both in a [`Row`][flet.].
|
|
46
|
+
|
|
47
|
+
Raises:
|
|
48
|
+
ValueError: If the [`label`][(c).] is neither a string nor
|
|
49
|
+
a visible control.
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
52
|
numeric: bool = False
|
|
@@ -93,10 +93,6 @@ class DataColumn(Control):
|
|
|
93
93
|
class DataCell(Control):
|
|
94
94
|
"""
|
|
95
95
|
The data for a cell of a [`DataTable`][flet.].
|
|
96
|
-
|
|
97
|
-
Raises:
|
|
98
|
-
ValueError: If the [`content`][(c).] is neither a string nor a visible
|
|
99
|
-
control.
|
|
100
96
|
"""
|
|
101
97
|
|
|
102
98
|
content: StrOrControl
|
|
@@ -113,6 +109,10 @@ class DataCell(Control):
|
|
|
113
109
|
To lay out multiple children, set the [`content`][(c).] to a
|
|
114
110
|
container-like control such as [`Row`][flet.], [`Column`][flet.], or
|
|
115
111
|
[`Stack`][flet.], which have a `controls` property.
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
ValueError: If the [`content`][(c).] is neither a string nor a visible
|
|
115
|
+
control.
|
|
116
116
|
"""
|
|
117
117
|
|
|
118
118
|
placeholder: bool = False
|
|
@@ -199,9 +199,6 @@ class DataRow(Control):
|
|
|
199
199
|
One row configuration must be provided for each row to display in the table.
|
|
200
200
|
|
|
201
201
|
The data for this row of the table is provided in the [`cells`][(c).] property.
|
|
202
|
-
|
|
203
|
-
Raises:
|
|
204
|
-
ValueError: If [`cells`][(c).] does not contain at least one visible DataCell.
|
|
205
202
|
"""
|
|
206
203
|
|
|
207
204
|
cells: list[DataCell] = field(default_factory=list)
|
|
@@ -210,6 +207,10 @@ class DataRow(Control):
|
|
|
210
207
|
|
|
211
208
|
Note:
|
|
212
209
|
There must be exactly as many cells as there are columns in the table.
|
|
210
|
+
|
|
211
|
+
Raises:
|
|
212
|
+
ValueError: If [`cells`][(c).] does not contain at least one visible
|
|
213
|
+
[`DataCell`][flet.].
|
|
213
214
|
"""
|
|
214
215
|
|
|
215
216
|
color: Optional[ControlStateValue[ColorValue]] = None
|
|
@@ -280,25 +281,23 @@ class DataRow(Control):
|
|
|
280
281
|
class DataTable(LayoutControl):
|
|
281
282
|
"""
|
|
282
283
|
A Material Design data table.
|
|
283
|
-
|
|
284
|
-
Raises:
|
|
285
|
-
ValueError: If there are no visible [`columns`][(c).].
|
|
286
|
-
ValueError: If any visible row does not contain exactly as many visible
|
|
287
|
-
[`DataRow.cells`][flet.] as there are visible [`columns`][(c).].
|
|
288
|
-
ValueError: If [`data_row_min_height`][(c).] is greater than
|
|
289
|
-
[`data_row_max_height`][(c).].
|
|
290
|
-
ValueError: If [`divider_thickness`][(c).] is negative.
|
|
291
|
-
ValueError: If [`sort_column_index`][(c).] is out of range.
|
|
292
284
|
"""
|
|
293
285
|
|
|
294
286
|
columns: list[DataColumn]
|
|
295
287
|
"""
|
|
296
288
|
A list of [`DataColumn`][flet.] controls describing table columns.
|
|
289
|
+
|
|
290
|
+
Raises:
|
|
291
|
+
ValueError: If there are no visible [`columns`][(c).].
|
|
297
292
|
"""
|
|
298
293
|
|
|
299
294
|
rows: list[DataRow] = field(default_factory=list)
|
|
300
295
|
"""
|
|
301
296
|
A list of [`DataRow`][flet.] controls defining table rows.
|
|
297
|
+
|
|
298
|
+
Raises:
|
|
299
|
+
ValueError: If any visible row does not contain exactly as many visible
|
|
300
|
+
[`DataCell`][flet.]s as there are visible [`columns`][(c).].
|
|
302
301
|
"""
|
|
303
302
|
|
|
304
303
|
sort_ascending: bool = False
|
|
@@ -336,6 +335,10 @@ class DataTable(LayoutControl):
|
|
|
336
335
|
|
|
337
336
|
When this is `None`, it implies that the table's sort order does not correspond to
|
|
338
337
|
any of the columns.
|
|
338
|
+
|
|
339
|
+
Raises:
|
|
340
|
+
ValueError: If [`sort_column_index`][(c).] is out of range relative to the
|
|
341
|
+
visible [`columns`][(c).].
|
|
339
342
|
"""
|
|
340
343
|
|
|
341
344
|
show_bottom_border: bool = False
|
|
@@ -397,6 +400,10 @@ class DataTable(LayoutControl):
|
|
|
397
400
|
|
|
398
401
|
Note:
|
|
399
402
|
Must be less than or equal to [`data_row_max_height`][(c).].
|
|
403
|
+
|
|
404
|
+
Raises:
|
|
405
|
+
ValueError: If [`data_row_min_height`][(c).] is greater than
|
|
406
|
+
[`data_row_max_height`][(c).].
|
|
400
407
|
"""
|
|
401
408
|
|
|
402
409
|
data_row_max_height: Optional[Number] = None
|
|
@@ -409,6 +416,10 @@ class DataTable(LayoutControl):
|
|
|
409
416
|
|
|
410
417
|
Note:
|
|
411
418
|
Must be greater than or equal to [`data_row_min_height`][(c).].
|
|
419
|
+
|
|
420
|
+
Raises:
|
|
421
|
+
ValueError: If [`data_row_max_height`][(c).] is less than
|
|
422
|
+
[`data_row_min_height`][(c).].
|
|
412
423
|
"""
|
|
413
424
|
|
|
414
425
|
data_text_style: Optional[TextStyle] = None
|
|
@@ -432,6 +443,9 @@ class DataTable(LayoutControl):
|
|
|
432
443
|
|
|
433
444
|
Note:
|
|
434
445
|
Must be greater than or equal to zero.
|
|
446
|
+
|
|
447
|
+
Raises:
|
|
448
|
+
ValueError: If [`divider_thickness`][(c).] is negative.
|
|
435
449
|
"""
|
|
436
450
|
|
|
437
451
|
heading_row_color: Optional[ControlStateValue[ColorValue]] = None
|
|
@@ -12,12 +12,6 @@ __all__ = ["Divider"]
|
|
|
12
12
|
class Divider(Control):
|
|
13
13
|
"""
|
|
14
14
|
A thin horizontal line (divider), with padding on either side.
|
|
15
|
-
|
|
16
|
-
Raises:
|
|
17
|
-
ValueError: If [`height`][(c).] is negative.
|
|
18
|
-
ValueError: If [`thickness`][(c).] is negative.
|
|
19
|
-
ValueError: If [`leading_indent`][(c).] is negative.
|
|
20
|
-
ValueError: If [`trailing_indent`][(c).] is negative.
|
|
21
15
|
"""
|
|
22
16
|
|
|
23
17
|
color: Optional[ColorValue] = None
|
|
@@ -34,6 +28,9 @@ class Divider(Control):
|
|
|
34
28
|
|
|
35
29
|
If `None`, [`DividerTheme.space`][flet.] is used.
|
|
36
30
|
If that's is also `None`, defaults to `16.0`.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ValueError: If [`height`][(c).] is negative.
|
|
37
34
|
"""
|
|
38
35
|
|
|
39
36
|
leading_indent: Optional[Number] = None
|
|
@@ -42,6 +39,9 @@ class Divider(Control):
|
|
|
42
39
|
|
|
43
40
|
If `None`, [`DividerTheme.leading_indent`][flet.] is used.
|
|
44
41
|
If that's is also `None`, defaults to `0.0`.
|
|
42
|
+
|
|
43
|
+
Raises:
|
|
44
|
+
ValueError: If [`leading_indent`][(c).] is negative.
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
thickness: Optional[Number] = None
|
|
@@ -53,6 +53,9 @@ class Divider(Control):
|
|
|
53
53
|
|
|
54
54
|
If `None`, [`DividerTheme.thickness`][flet.] is used.
|
|
55
55
|
If that is also `None`, defaults to `0.0`.
|
|
56
|
+
|
|
57
|
+
Raises:
|
|
58
|
+
ValueError: If [`thickness`][(c).] is negative.
|
|
56
59
|
"""
|
|
57
60
|
|
|
58
61
|
trailing_indent: Optional[Number] = None
|
|
@@ -61,6 +64,9 @@ class Divider(Control):
|
|
|
61
64
|
|
|
62
65
|
If `None`, [`DividerTheme.trailing_indent`][flet.] is used.
|
|
63
66
|
If that is also `None`, defaults to `0.0`.
|
|
67
|
+
|
|
68
|
+
Raises:
|
|
69
|
+
ValueError: If [`trailing_indent`][(c).] is negative.
|
|
64
70
|
"""
|
|
65
71
|
|
|
66
72
|
radius: Optional[BorderRadiusValue] = None
|
|
@@ -30,9 +30,6 @@ class DropdownOption(Control):
|
|
|
30
30
|
"""
|
|
31
31
|
Represents an item in a dropdown. Either `key` or `text` must be specified, else an
|
|
32
32
|
`AssertionError` will be raised.
|
|
33
|
-
|
|
34
|
-
Raises:
|
|
35
|
-
ValueError: If neither [`key`][(c).] nor [`text`][(c).] are provided.
|
|
36
33
|
"""
|
|
37
34
|
|
|
38
35
|
key: Optional[str] = None
|
|
@@ -44,6 +41,9 @@ class DropdownOption(Control):
|
|
|
44
41
|
text: Optional[str] = None
|
|
45
42
|
"""
|
|
46
43
|
Option's display text. If not specified `key` will be used as fallback.
|
|
44
|
+
|
|
45
|
+
Raises:
|
|
46
|
+
ValueError: If neither [`key`][(c).] nor [`text`][(c).] are provided.
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
content: Optional[Control] = None
|
|
@@ -33,9 +33,6 @@ class ExpansionTile(LayoutControl, AdaptiveControl):
|
|
|
33
33
|
"""
|
|
34
34
|
A single-line ListTile with an expansion arrow icon that expands or collapses the
|
|
35
35
|
tile to reveal or hide its controls.
|
|
36
|
-
|
|
37
|
-
Raises:
|
|
38
|
-
ValueError: If [`title`][(c).] is neither a string nor a visible Control.
|
|
39
36
|
"""
|
|
40
37
|
|
|
41
38
|
title: StrOrControl
|
|
@@ -43,6 +40,9 @@ class ExpansionTile(LayoutControl, AdaptiveControl):
|
|
|
43
40
|
A `Control` to display as primary content of the tile.
|
|
44
41
|
|
|
45
42
|
Typically a [`Text`][flet.] control.
|
|
43
|
+
|
|
44
|
+
Raises:
|
|
45
|
+
ValueError: If [`title`][(c).] is neither a string nor a visible Control.
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
controls: Optional[list[Control]] = None
|