flet 0.70.0.dev6214__py3-none-any.whl → 0.70.0.dev6268__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/column.py +15 -2
- 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/grid_view.py +22 -0
- flet/controls/core/icon.py +12 -4
- flet/controls/core/image.py +9 -0
- 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.py +4 -0
- 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 +7 -3
- flet/controls/cupertino/cupertino_checkbox.py +11 -0
- 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_filled_button.py +4 -0
- flet/controls/cupertino/cupertino_list_tile.py +14 -3
- flet/controls/cupertino/cupertino_navigation_bar.py +8 -5
- flet/controls/cupertino/cupertino_picker.py +9 -4
- flet/controls/cupertino/cupertino_radio.py +14 -0
- flet/controls/cupertino/cupertino_segmented_button.py +18 -4
- flet/controls/cupertino/cupertino_slider.py +13 -4
- flet/controls/cupertino/cupertino_sliding_segmented_button.py +18 -4
- flet/controls/cupertino/cupertino_switch.py +4 -0
- flet/controls/cupertino/cupertino_textfield.py +4 -0
- flet/controls/cupertino/cupertino_timer_picker.py +16 -13
- flet/controls/cupertino/cupertino_tinted_button.py +4 -0
- 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/card.py +15 -0
- flet/controls/material/checkbox.py +6 -0
- flet/controls/material/chip.py +16 -5
- flet/controls/material/circle_avatar.py +19 -5
- flet/controls/material/datatable.py +56 -19
- flet/controls/material/divider.py +23 -5
- flet/controls/material/dropdown.py +14 -3
- flet/controls/material/dropdownm2.py +11 -0
- flet/controls/material/expansion_panel.py +34 -0
- flet/controls/material/expansion_tile.py +15 -2
- flet/controls/material/filled_button.py +4 -0
- flet/controls/material/filled_tonal_button.py +4 -0
- flet/controls/material/floating_action_button.py +22 -7
- flet/controls/material/icon_button.py +14 -2
- flet/controls/material/list_tile.py +11 -0
- 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 +14 -5
- flet/controls/material/vertical_divider.py +12 -6
- flet/testing/flet_test_app.py +1 -0
- flet/version.py +1 -1
- {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6268.dist-info}/METADATA +1 -1
- {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6268.dist-info}/RECORD +80 -80
- {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6268.dist-info}/WHEEL +0 -0
- {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6268.dist-info}/entry_points.txt +0 -0
- {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6268.dist-info}/top_level.txt +0 -0
|
@@ -14,11 +14,6 @@ class ProgressBar(LayoutControl):
|
|
|
14
14
|
A material design linear progress indicator, also known as a progress bar.
|
|
15
15
|
|
|
16
16
|
A control that shows progress along a line.
|
|
17
|
-
|
|
18
|
-
Raises:
|
|
19
|
-
ValueError: If [`value`][(c).] is negative.
|
|
20
|
-
ValueError: If [`bar_height`][(c).] is negative.
|
|
21
|
-
ValueError: If [`semantics_value`][(c).] is negative.
|
|
22
17
|
"""
|
|
23
18
|
|
|
24
19
|
value: Optional[Number] = None
|
|
@@ -31,11 +26,17 @@ class ProgressBar(LayoutControl):
|
|
|
31
26
|
Defaults to `None`, meaning that this progress indicator is indeterminate -
|
|
32
27
|
displays a predetermined animation that does not indicate how much actual progress
|
|
33
28
|
is being made.
|
|
29
|
+
|
|
30
|
+
Raises:
|
|
31
|
+
ValueError: If [`value`][(c).] is negative.
|
|
34
32
|
"""
|
|
35
33
|
|
|
36
34
|
bar_height: Optional[Number] = None
|
|
37
35
|
"""
|
|
38
36
|
The minimum height of the line used to draw the linear indicator.
|
|
37
|
+
|
|
38
|
+
Raises:
|
|
39
|
+
ValueError: If [`bar_height`][(c).] is negative.
|
|
39
40
|
"""
|
|
40
41
|
|
|
41
42
|
color: Optional[ColorValue] = None
|
|
@@ -63,6 +64,9 @@ class ProgressBar(LayoutControl):
|
|
|
63
64
|
semantics_value: Optional[Number] = None
|
|
64
65
|
"""
|
|
65
66
|
The semantics label for this progress indicator.
|
|
67
|
+
|
|
68
|
+
Raises:
|
|
69
|
+
ValueError: If [`semantics_value`][(c).] is negative.
|
|
66
70
|
"""
|
|
67
71
|
|
|
68
72
|
stop_indicator_color: Optional[ColorValue] = None
|
|
@@ -11,9 +11,6 @@ __all__ = ["RadioGroup"]
|
|
|
11
11
|
class RadioGroup(Control):
|
|
12
12
|
"""
|
|
13
13
|
Radio buttons let people select a single option from two or more choices.
|
|
14
|
-
|
|
15
|
-
Raises:
|
|
16
|
-
ValueError: If [`content`][(c).] is not visible.
|
|
17
14
|
"""
|
|
18
15
|
|
|
19
16
|
content: Control
|
|
@@ -22,6 +19,9 @@ class RadioGroup(Control):
|
|
|
22
19
|
|
|
23
20
|
Typically a list of `Radio` controls nested in a container control, e.g. `Column`,
|
|
24
21
|
`Row`.
|
|
22
|
+
|
|
23
|
+
Raises:
|
|
24
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
value: Optional[str] = None
|
|
@@ -20,18 +20,17 @@ class RangeSlider(LayoutControl):
|
|
|
20
20
|
A range slider can be used to select from either a continuous or a discrete
|
|
21
21
|
set of values.
|
|
22
22
|
The default is to use a continuous range of values from min to max.
|
|
23
|
-
|
|
24
|
-
Raises:
|
|
25
|
-
ValueError: If [`end_value`][(c).] is greater than [`max`][(c).].
|
|
26
|
-
ValueError: If [`start_value`][(c).] is less than [`min`][(c).].
|
|
27
|
-
ValueError: If [`start_value`][(c).] is greater than [`end_value`][(c).].
|
|
28
23
|
"""
|
|
29
24
|
|
|
30
25
|
start_value: Number
|
|
31
26
|
"""
|
|
32
27
|
The currently selected start value for the slider.
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
The slider's left thumb is drawn at a position that corresponds to this value.
|
|
30
|
+
|
|
31
|
+
Raises:
|
|
32
|
+
ValueError: If [`start_value`][(c).] is less than [`min`][(c).] or greater
|
|
33
|
+
than [`end_value`][(c).].
|
|
35
34
|
"""
|
|
36
35
|
|
|
37
36
|
end_value: Number
|
|
@@ -39,6 +38,10 @@ class RangeSlider(LayoutControl):
|
|
|
39
38
|
The currently selected end value for the slider.
|
|
40
39
|
|
|
41
40
|
The slider's right thumb is drawn at a position that corresponds to this value.
|
|
41
|
+
|
|
42
|
+
Raises:
|
|
43
|
+
ValueError: If [`end_value`][(c).] is greater than [`max`][(c).] or less than
|
|
44
|
+
[`start_value`][(c).].
|
|
42
45
|
"""
|
|
43
46
|
|
|
44
47
|
label: Optional[str] = None
|
|
@@ -57,6 +60,9 @@ class RangeSlider(LayoutControl):
|
|
|
57
60
|
Defaults to `0.0`. Must be less than or equal to `max`.
|
|
58
61
|
|
|
59
62
|
If the `max` is equal to the `min`, then the slider is disabled.
|
|
63
|
+
|
|
64
|
+
Raises:
|
|
65
|
+
ValueError: If [`min`][(c).] is greater than [`max`][(c).].
|
|
60
66
|
"""
|
|
61
67
|
|
|
62
68
|
max: Optional[Number] = None
|
|
@@ -66,6 +72,9 @@ class RangeSlider(LayoutControl):
|
|
|
66
72
|
If the `max` is equal to the `min`, then the slider is disabled.
|
|
67
73
|
|
|
68
74
|
Defaults to `1.0`.
|
|
75
|
+
|
|
76
|
+
Raises:
|
|
77
|
+
ValueError: If [`max`][(c).] is less than [`min`][(c).].
|
|
69
78
|
"""
|
|
70
79
|
|
|
71
80
|
divisions: Optional[int] = None
|
|
@@ -21,9 +21,6 @@ __all__ = ["Segment", "SegmentedButton"]
|
|
|
21
21
|
class Segment(Control):
|
|
22
22
|
"""
|
|
23
23
|
A segment for a [`SegmentedButton`][flet.].
|
|
24
|
-
|
|
25
|
-
Raises:
|
|
26
|
-
ValueError: If neither [`icon`][(c).] nor [`label`][(c).] is set.
|
|
27
24
|
"""
|
|
28
25
|
|
|
29
26
|
value: str
|
|
@@ -41,6 +38,9 @@ class Segment(Control):
|
|
|
41
38
|
"""
|
|
42
39
|
The label (usually a [`Text`][flet.]) to be
|
|
43
40
|
displayed in the segment.
|
|
41
|
+
|
|
42
|
+
Raises:
|
|
43
|
+
ValueError: If neither [`icon`][(c).] nor [`label`][(c).] is set.
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
def before_update(self):
|
|
@@ -58,19 +58,15 @@ class Segment(Control):
|
|
|
58
58
|
class SegmentedButton(LayoutControl):
|
|
59
59
|
"""
|
|
60
60
|
A segmented button control.
|
|
61
|
-
|
|
62
|
-
Raises:
|
|
63
|
-
ValueError: If [`segments`][(c).] is empty or does not have at
|
|
64
|
-
least one visible `Segment`.
|
|
65
|
-
ValueError: If [`selected`][(c).] is empty and
|
|
66
|
-
[`allow_empty_selection`][(c).] is `False`.
|
|
67
|
-
ValueError: If [`selected`][(c).] has more than one item and
|
|
68
|
-
[`allow_multiple_selection`][(c).] is `False`.
|
|
69
61
|
"""
|
|
70
62
|
|
|
71
63
|
segments: list[Segment]
|
|
72
64
|
"""
|
|
73
65
|
The segments of this button.
|
|
66
|
+
|
|
67
|
+
Raises:
|
|
68
|
+
ValueError: If [`segments`][(c).] is empty or does not have at least one
|
|
69
|
+
visible `Segment`.
|
|
74
70
|
"""
|
|
75
71
|
|
|
76
72
|
style: Optional[ButtonStyle] = None
|
|
@@ -88,6 +84,10 @@ class SegmentedButton(LayoutControl):
|
|
|
88
84
|
If `False` (the default), there must be at least one segment selected. If the user
|
|
89
85
|
taps on the only selected segment it will not be deselected, and `on_change` will
|
|
90
86
|
not be called.
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
ValueError: If [`selected`][(c).] is empty while
|
|
90
|
+
[`allow_empty_selection`][(c).] is `False`.
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
93
|
allow_multiple_selection: bool = False
|
|
@@ -100,12 +100,21 @@ class SegmentedButton(LayoutControl):
|
|
|
100
100
|
|
|
101
101
|
If `False` (the default), only one segment may be selected at a time. When a segment
|
|
102
102
|
is selected, any previously selected segment will be unselected.
|
|
103
|
+
|
|
104
|
+
Raises:
|
|
105
|
+
ValueError: If [`selected`][(c).] has more than one item while
|
|
106
|
+
[`allow_multiple_selection`][(c).] is `False`.
|
|
103
107
|
"""
|
|
104
108
|
|
|
105
109
|
selected: list[str] = field(default_factory=list)
|
|
106
110
|
"""
|
|
107
111
|
A set of `Segment.value`s that indicate which segments are selected. It is updated
|
|
108
112
|
when the user (un)selects a segment.
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
ValueError: If [`selected`][(c).] violates the constraints defined by
|
|
116
|
+
[`allow_empty_selection`][(c).] or
|
|
117
|
+
[`allow_multiple_selection`][(c).].
|
|
109
118
|
"""
|
|
110
119
|
|
|
111
120
|
selected_icon: Optional[IconDataOrControl] = None
|
|
@@ -12,9 +12,6 @@ class SelectionArea(Control):
|
|
|
12
12
|
"""
|
|
13
13
|
Flet controls are not selectable by default. SelectionArea is used to enable
|
|
14
14
|
selection for its child control.
|
|
15
|
-
|
|
16
|
-
Raises:
|
|
17
|
-
ValueError: If [`content`][(c).] is not visible
|
|
18
15
|
"""
|
|
19
16
|
|
|
20
17
|
content: Control
|
|
@@ -24,6 +21,9 @@ class SelectionArea(Control):
|
|
|
24
21
|
If you need to have multiple selectable controls, use container-like controls
|
|
25
22
|
like [`Row`][flet.] or [`Column`][flet.], which have a `controls` property
|
|
26
23
|
for this purpose.
|
|
24
|
+
|
|
25
|
+
Raises:
|
|
26
|
+
ValueError: If [`content`][(c).] is not visible.
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
29
|
on_change: Optional[ControlEventHandler["SelectionArea"]] = None
|
flet/controls/material/slider.py
CHANGED
|
@@ -32,11 +32,6 @@ class Slider(LayoutControl, AdaptiveControl):
|
|
|
32
32
|
Use a slider when you want people to set defined values (such as volume or
|
|
33
33
|
brightness), or when people would benefit from instant feedback on the effect
|
|
34
34
|
of setting changes.
|
|
35
|
-
|
|
36
|
-
Raises:
|
|
37
|
-
ValueError: If [`min`][(c).] is greater than [`max`][(c).].
|
|
38
|
-
ValueError: If [`value`][(c).] is less than [`min`][(c).].
|
|
39
|
-
ValueError: If [`value`][(c).] is greater than [`max`][(c).].
|
|
40
35
|
"""
|
|
41
36
|
|
|
42
37
|
value: Optional[Number] = None
|
|
@@ -46,6 +41,10 @@ class Slider(LayoutControl, AdaptiveControl):
|
|
|
46
41
|
The slider's thumb is drawn at a position that corresponds to this value.
|
|
47
42
|
|
|
48
43
|
Defaults to value of [`min`][(c).].
|
|
44
|
+
|
|
45
|
+
Raises:
|
|
46
|
+
ValueError: If [`value`][(c).] is less than [`min`][(c).] or greater than
|
|
47
|
+
[`max`][(c).].
|
|
49
48
|
"""
|
|
50
49
|
|
|
51
50
|
label: Optional[str] = None
|
|
@@ -68,6 +67,9 @@ class Slider(LayoutControl, AdaptiveControl):
|
|
|
68
67
|
- Must be less than or equal to [`max`][(c).].
|
|
69
68
|
- If the [`max`][(c).] is equal to the `min`, then this slider
|
|
70
69
|
is disabled.
|
|
70
|
+
|
|
71
|
+
Raises:
|
|
72
|
+
ValueError: If [`min`][(c).] is greater than [`max`][(c).].
|
|
71
73
|
"""
|
|
72
74
|
|
|
73
75
|
max: Number = 1.0
|
|
@@ -78,6 +80,9 @@ class Slider(LayoutControl, AdaptiveControl):
|
|
|
78
80
|
- Must be greater than or equal to [`min`][(c).].
|
|
79
81
|
- If the [`min`][(c).] is equal to the `max`, then this slider
|
|
80
82
|
is disabled.
|
|
83
|
+
|
|
84
|
+
Raises:
|
|
85
|
+
ValueError: If [`max`][(c).] is less than [`min`][(c).].
|
|
81
86
|
"""
|
|
82
87
|
|
|
83
88
|
divisions: Optional[int] = None
|
|
@@ -93,11 +93,6 @@ class SnackBar(DialogControl):
|
|
|
93
93
|
"""
|
|
94
94
|
A lightweight message with an optional action which briefly displays at the
|
|
95
95
|
bottom of the screen.
|
|
96
|
-
|
|
97
|
-
Raises:
|
|
98
|
-
ValueError: If [`content`][(c).] is not a string or visible control.
|
|
99
|
-
ValueError: If [`action_overflow_threshold`][(c).] is not between 0 and 1.
|
|
100
|
-
ValueError: If [`elevation`][(c).] is negative.
|
|
101
96
|
"""
|
|
102
97
|
|
|
103
98
|
content: StrOrControl
|
|
@@ -105,6 +100,9 @@ class SnackBar(DialogControl):
|
|
|
105
100
|
The primary content of the snack bar.
|
|
106
101
|
|
|
107
102
|
Typically a [`Text`][flet.] control.
|
|
103
|
+
|
|
104
|
+
Raises:
|
|
105
|
+
ValueError: If [`content`][(c).] is not a string or visible control.
|
|
108
106
|
"""
|
|
109
107
|
|
|
110
108
|
behavior: Optional[SnackBarBehavior] = None
|
|
@@ -195,6 +193,9 @@ class SnackBar(DialogControl):
|
|
|
195
193
|
"""
|
|
196
194
|
The z-coordinate at which to place the snack bar. This controls the size of the
|
|
197
195
|
shadow below the snack bar.
|
|
196
|
+
|
|
197
|
+
Raises:
|
|
198
|
+
ValueError: If [`elevation`][(c).] is negative.
|
|
198
199
|
"""
|
|
199
200
|
|
|
200
201
|
shape: Optional[OutlinedBorder] = None
|
|
@@ -220,6 +221,9 @@ class SnackBar(DialogControl):
|
|
|
220
221
|
|
|
221
222
|
Note:
|
|
222
223
|
Must be between `0.0` and `1.0` inclusive.
|
|
224
|
+
|
|
225
|
+
Raises:
|
|
226
|
+
ValueError: If [`action_overflow_threshold`][(c).] is not between `0` and `1`.
|
|
223
227
|
"""
|
|
224
228
|
|
|
225
229
|
on_action: Optional[ControlEventHandler["SnackBar"]] = None
|
flet/controls/material/switch.py
CHANGED
|
@@ -26,9 +26,6 @@ class Switch(LayoutControl, AdaptiveControl):
|
|
|
26
26
|
two mutually exclusive options.
|
|
27
27
|
|
|
28
28
|
For example, "On/Off", "Show/Hide".
|
|
29
|
-
|
|
30
|
-
Raises:
|
|
31
|
-
ValueError: If [`splash_radius`][(c).] is negative.
|
|
32
29
|
"""
|
|
33
30
|
|
|
34
31
|
label: Optional[StrOrControl] = None
|
|
@@ -159,6 +156,9 @@ class Switch(LayoutControl, AdaptiveControl):
|
|
|
159
156
|
splash_radius: Optional[Number] = None
|
|
160
157
|
"""
|
|
161
158
|
The radius of the splash effect when the switch is pressed.
|
|
159
|
+
|
|
160
|
+
Raises:
|
|
161
|
+
ValueError: If [`splash_radius`][(c).] is negative.
|
|
162
162
|
"""
|
|
163
163
|
|
|
164
164
|
overlay_color: Optional[ControlStateValue[ColorValue]] = None
|
flet/controls/material/tabs.py
CHANGED
|
@@ -153,11 +153,6 @@ class Tabs(LayoutControl, AdaptiveControl):
|
|
|
153
153
|
Used for navigating frequently accessed, distinct content
|
|
154
154
|
categories. Tabs allow for navigation between two or more content views and relies
|
|
155
155
|
on text headers to articulate the different sections of content.
|
|
156
|
-
|
|
157
|
-
Raises:
|
|
158
|
-
ValueError: If [`length`][(c).] is negative.
|
|
159
|
-
IndexError: If [`selected_index`][(c).] is not in the range
|
|
160
|
-
`[-length, length - 1]`.
|
|
161
156
|
"""
|
|
162
157
|
|
|
163
158
|
content: Control
|
|
@@ -175,6 +170,9 @@ class Tabs(LayoutControl, AdaptiveControl):
|
|
|
175
170
|
Must match the length of both [`TabBar.tabs`][flet.]
|
|
176
171
|
and [`TabBarView.controls`][flet.]. Don't forget to update
|
|
177
172
|
it when adding/removing tabs.
|
|
173
|
+
|
|
174
|
+
Raises:
|
|
175
|
+
ValueError: If [`length`][(c).] is negative.
|
|
178
176
|
"""
|
|
179
177
|
|
|
180
178
|
selected_index: int = 0
|
|
@@ -191,6 +189,10 @@ class Tabs(LayoutControl, AdaptiveControl):
|
|
|
191
189
|
[`AnimationCurve.EASE`][flet.] animation curve. To specify
|
|
192
190
|
a different animation curve or duration for this particular change,
|
|
193
191
|
use [`move_to`][(c).] directly.
|
|
192
|
+
|
|
193
|
+
Raises:
|
|
194
|
+
IndexError: If [`selected_index`][(c).] is not in the range
|
|
195
|
+
`[-length, length - 1]`.
|
|
194
196
|
"""
|
|
195
197
|
|
|
196
198
|
animation_duration: DurationValue = field(
|
|
@@ -314,12 +316,6 @@ class TabBar(LayoutControl, AdaptiveControl):
|
|
|
314
316
|
Used for navigating frequently accessed, distinct content
|
|
315
317
|
categories. Tabs allow for navigation between two or more content views and relies
|
|
316
318
|
on text headers to articulate the different sections of content.
|
|
317
|
-
|
|
318
|
-
Raises:
|
|
319
|
-
ValueError: If [`indicator`][(c).] is None and
|
|
320
|
-
[`indicator_thickness`][(c).] is not strictly greater than 0.
|
|
321
|
-
ValueError: If [`tab_alignment`][(c).] is not valid for
|
|
322
|
-
the given [`scrollable`][(c).] state.
|
|
323
319
|
"""
|
|
324
320
|
|
|
325
321
|
tabs: list[Control]
|
|
@@ -366,6 +362,10 @@ class TabBar(LayoutControl, AdaptiveControl):
|
|
|
366
362
|
[`TabAlignment.START`][flet.],
|
|
367
363
|
[`TabAlignment.START_OFFSET`][flet.]
|
|
368
364
|
or [`TabAlignment.CENTER`][flet.].
|
|
365
|
+
|
|
366
|
+
Raises:
|
|
367
|
+
ValueError: If [`tab_alignment`][(c).] is not valid for the current
|
|
368
|
+
[`scrollable`][(c).] configuration.
|
|
369
369
|
"""
|
|
370
370
|
|
|
371
371
|
divider_color: Optional[ColorValue] = None
|
|
@@ -487,6 +487,10 @@ class TabBar(LayoutControl, AdaptiveControl):
|
|
|
487
487
|
Note:
|
|
488
488
|
Will be ignored if [`indicator`][(c).] or
|
|
489
489
|
[`TabBarTheme.indicator`][flet.] is not `None`.
|
|
490
|
+
|
|
491
|
+
Raises:
|
|
492
|
+
ValueError: If [`indicator`][(c).] is `None` and
|
|
493
|
+
[`indicator_thickness`][(c).] is not strictly greater than `0`.
|
|
490
494
|
"""
|
|
491
495
|
|
|
492
496
|
enable_feedback: Optional[bool] = None
|
|
@@ -563,14 +567,14 @@ class TabBar(LayoutControl, AdaptiveControl):
|
|
|
563
567
|
class Tab(AdaptiveControl):
|
|
564
568
|
"""
|
|
565
569
|
A Material Design [`TabBar`][flet.] tab.
|
|
566
|
-
|
|
567
|
-
Raises:
|
|
568
|
-
ValueError: If both [`label`][(c).] and [`icon`][(c).] are not set.
|
|
569
570
|
"""
|
|
570
571
|
|
|
571
572
|
label: Optional[StrOrControl] = None
|
|
572
573
|
"""
|
|
573
574
|
The tab's name. Can be either a string or a control.
|
|
575
|
+
|
|
576
|
+
Raises:
|
|
577
|
+
ValueError: If both [`label`][(c).] and [`icon`][(c).] are not set.
|
|
574
578
|
"""
|
|
575
579
|
|
|
576
580
|
icon: Optional[IconDataOrControl] = None
|
|
@@ -134,11 +134,9 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
134
134
|
A text field lets the user enter text, either with hardware keyboard or with an
|
|
135
135
|
onscreen keyboard.
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
ValueError: If [`min_lines`][(c).] is greater than [`max_lines`][(c).].
|
|
141
|
-
ValueError: If [`max_length`][(c).] is not -1 or positive.
|
|
137
|
+
```python
|
|
138
|
+
ft.TextField(label="Name", hint_text="Jane Doe")
|
|
139
|
+
```
|
|
142
140
|
"""
|
|
143
141
|
|
|
144
142
|
value: str = ""
|
|
@@ -164,6 +162,10 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
164
162
|
that can be entered into the field.
|
|
165
163
|
|
|
166
164
|
Defaults to `1`.
|
|
165
|
+
|
|
166
|
+
Raises:
|
|
167
|
+
ValueError: If [`min_lines`][(c).] is not positive or exceeds
|
|
168
|
+
[`max_lines`][(c).] when both are set.
|
|
167
169
|
"""
|
|
168
170
|
|
|
169
171
|
max_lines: Optional[int] = None
|
|
@@ -175,11 +177,18 @@ class TextField(FormFieldControl, AdaptiveControl):
|
|
|
175
177
|
|
|
176
178
|
If this is `1` (the default), the text will not wrap, but will scroll horizontally
|
|
177
179
|
instead.
|
|
180
|
+
|
|
181
|
+
Raises:
|
|
182
|
+
ValueError: If [`max_lines`][(c).] is not positive or is less than
|
|
183
|
+
[`min_lines`][(c).].
|
|
178
184
|
"""
|
|
179
185
|
|
|
180
186
|
max_length: Optional[int] = None
|
|
181
187
|
"""
|
|
182
188
|
Limits a maximum number of characters that can be entered into TextField.
|
|
189
|
+
|
|
190
|
+
Raises:
|
|
191
|
+
ValueError: If [`max_length`][(c).] is neither `-1` nor a positive integer.
|
|
183
192
|
"""
|
|
184
193
|
|
|
185
194
|
password: bool = False
|
|
@@ -14,12 +14,6 @@ class VerticalDivider(Control):
|
|
|
14
14
|
A thin vertical line, with padding on either side.
|
|
15
15
|
|
|
16
16
|
In the material design language, this represents a divider.
|
|
17
|
-
|
|
18
|
-
Raises:
|
|
19
|
-
ValueError: If [`width`][(c).] is negative.
|
|
20
|
-
ValueError: If [`thickness`][(c).] is negative.
|
|
21
|
-
ValueError: If [`leading_indent`][(c).] is negative.
|
|
22
|
-
ValueError: If [`trailing_indent`][(c).] is negative.
|
|
23
17
|
"""
|
|
24
18
|
|
|
25
19
|
width: Optional[Number] = None
|
|
@@ -29,6 +23,9 @@ class VerticalDivider(Control):
|
|
|
29
23
|
|
|
30
24
|
If `None`, [`DividerTheme.space`][flet.] is used.
|
|
31
25
|
If that's is also `None`, defaults to `16.0`.
|
|
26
|
+
|
|
27
|
+
Raises:
|
|
28
|
+
ValueError: If [`width`][(c).] is negative.
|
|
32
29
|
"""
|
|
33
30
|
|
|
34
31
|
thickness: Optional[Number] = None
|
|
@@ -41,6 +38,9 @@ class VerticalDivider(Control):
|
|
|
41
38
|
|
|
42
39
|
If `None`, [`DividerTheme.thickness`][flet.] is used.
|
|
43
40
|
If that's is also `None`, defaults to `0.0`.
|
|
41
|
+
|
|
42
|
+
Raises:
|
|
43
|
+
ValueError: If [`thickness`][(c).] is negative.
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
color: Optional[ColorValue] = None
|
|
@@ -57,6 +57,9 @@ class VerticalDivider(Control):
|
|
|
57
57
|
|
|
58
58
|
If `None`, [`DividerTheme.leading_indent`][flet.] is used.
|
|
59
59
|
If that's is also `None`, defaults to `0.0`.
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
ValueError: If [`leading_indent`][(c).] is negative.
|
|
60
63
|
"""
|
|
61
64
|
|
|
62
65
|
trailing_indent: Optional[Number] = None
|
|
@@ -65,6 +68,9 @@ class VerticalDivider(Control):
|
|
|
65
68
|
|
|
66
69
|
If `None`, [`DividerTheme.trailing_indent`][flet.] is used.
|
|
67
70
|
If that's is also `None`, defaults to `0.0`.
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
ValueError: If [`trailing_indent`][(c).] is negative.
|
|
68
74
|
"""
|
|
69
75
|
|
|
70
76
|
radius: Optional[BorderRadiusValue] = None
|
flet/testing/flet_test_app.py
CHANGED
flet/version.py
CHANGED