flet 0.70.0.dev6214__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.

Files changed (62) hide show
  1. flet/controls/base_control.py +1 -1
  2. flet/controls/border.py +3 -3
  3. flet/controls/control.py +6 -4
  4. flet/controls/core/animated_switcher.py +3 -3
  5. flet/controls/core/autofill_group.py +5 -3
  6. flet/controls/core/dismissible.py +9 -5
  7. flet/controls/core/drag_target.py +5 -3
  8. flet/controls/core/draggable.py +6 -4
  9. flet/controls/core/icon.py +9 -5
  10. flet/controls/core/interactive_viewer.py +16 -8
  11. flet/controls/core/pagelet.py +3 -3
  12. flet/controls/core/reorderable_draggable.py +5 -3
  13. flet/controls/core/safe_area.py +5 -3
  14. flet/controls/core/text_span.py +3 -3
  15. flet/controls/core/window_drag_area.py +3 -3
  16. flet/controls/cupertino/cupertino_action_sheet.py +4 -4
  17. flet/controls/cupertino/cupertino_action_sheet_action.py +3 -3
  18. flet/controls/cupertino/cupertino_activity_indicator.py +3 -3
  19. flet/controls/cupertino/cupertino_button.py +4 -4
  20. flet/controls/cupertino/cupertino_context_menu.py +6 -4
  21. flet/controls/cupertino/cupertino_context_menu_action.py +3 -3
  22. flet/controls/cupertino/cupertino_date_picker.py +26 -9
  23. flet/controls/cupertino/cupertino_dialog_action.py +3 -3
  24. flet/controls/cupertino/cupertino_list_tile.py +3 -3
  25. flet/controls/cupertino/cupertino_navigation_bar.py +8 -5
  26. flet/controls/cupertino/cupertino_picker.py +9 -4
  27. flet/controls/cupertino/cupertino_segmented_button.py +8 -5
  28. flet/controls/cupertino/cupertino_slider.py +10 -5
  29. flet/controls/cupertino/cupertino_sliding_segmented_button.py +8 -5
  30. flet/controls/cupertino/cupertino_timer_picker.py +16 -13
  31. flet/controls/material/alert_dialog.py +4 -4
  32. flet/controls/material/app_bar.py +10 -6
  33. flet/controls/material/banner.py +10 -6
  34. flet/controls/material/bottom_app_bar.py +3 -3
  35. flet/controls/material/bottom_sheet.py +3 -3
  36. flet/controls/material/chip.py +10 -6
  37. flet/controls/material/circle_avatar.py +12 -6
  38. flet/controls/material/datatable.py +34 -20
  39. flet/controls/material/divider.py +12 -6
  40. flet/controls/material/dropdown.py +3 -3
  41. flet/controls/material/expansion_tile.py +3 -3
  42. flet/controls/material/floating_action_button.py +19 -8
  43. flet/controls/material/icon_button.py +3 -3
  44. flet/controls/material/navigation_rail.py +9 -5
  45. flet/controls/material/outlined_button.py +3 -3
  46. flet/controls/material/progress_bar.py +9 -5
  47. flet/controls/material/radio_group.py +3 -3
  48. flet/controls/material/range_slider.py +15 -6
  49. flet/controls/material/segmented_button.py +20 -11
  50. flet/controls/material/selection_area.py +3 -3
  51. flet/controls/material/slider.py +10 -5
  52. flet/controls/material/snack_bar.py +9 -5
  53. flet/controls/material/switch.py +3 -3
  54. flet/controls/material/tabs.py +18 -14
  55. flet/controls/material/textfield.py +11 -6
  56. flet/controls/material/vertical_divider.py +12 -6
  57. flet/version.py +1 -1
  58. {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6232.dist-info}/METADATA +1 -1
  59. {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6232.dist-info}/RECORD +62 -62
  60. {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6232.dist-info}/WHEEL +0 -0
  61. {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6232.dist-info}/entry_points.txt +0 -0
  62. {flet-0.70.0.dev6214.dist-info → flet-0.70.0.dev6232.dist-info}/top_level.txt +0 -0
@@ -25,19 +25,15 @@ class FloatingActionButton(LayoutControl):
25
25
  promote a primary action in the application. Floating action button is usually set
26
26
  to `page.floating_action_button`, but can also be added as a regular control at any
27
27
  place on a page.
28
-
29
- Raises:
30
- ValueError: If neither [`icon`][(c).] nor a valid [`content`][(c).]
31
- (string or visible Control) is provided.
32
- ValueError: If [`elevation`][(c).],
33
- [`disabled_elevation`][(c).], [`focus_elevation`][(c).],
34
- [`highlight_elevation`][(c).], or [`hover_elevation`][(c).]
35
- is negative.
36
28
  """
37
29
 
38
30
  content: Optional[StrOrControl] = None
39
31
  """
40
32
  The content of this button.
33
+
34
+ Raises:
35
+ ValueError: If neither [`icon`][(c).] nor a valid [`content`][(c).]
36
+ (string or visible Control) is provided.
41
37
  """
42
38
 
43
39
  icon: Optional[IconDataOrControl] = None
@@ -93,6 +89,9 @@ class FloatingActionButton(LayoutControl):
93
89
  The elevation of this button.
94
90
 
95
91
  Defaults to `6`.
92
+
93
+ Raises:
94
+ ValueError: If [`elevation`][(c).] is negative.
96
95
  """
97
96
 
98
97
  disabled_elevation: Optional[Number] = None
@@ -100,6 +99,9 @@ class FloatingActionButton(LayoutControl):
100
99
  The elevation of this button when disabled.
101
100
 
102
101
  Defaults to the same value as `elevation`.
102
+
103
+ Raises:
104
+ ValueError: If [`disabled_elevation`][(c).] is negative.
103
105
  """
104
106
 
105
107
  focus_elevation: Optional[Number] = None
@@ -107,6 +109,9 @@ class FloatingActionButton(LayoutControl):
107
109
  The elevation of this button when it has input focus.
108
110
 
109
111
  Defaults to `8`.
112
+
113
+ Raises:
114
+ ValueError: If [`focus_elevation`][(c).] is negative.
110
115
  """
111
116
 
112
117
  highlight_elevation: Optional[Number] = None
@@ -114,6 +119,9 @@ class FloatingActionButton(LayoutControl):
114
119
  The elevation of this button when it is highlighted.
115
120
 
116
121
  Defaults to `12`.
122
+
123
+ Raises:
124
+ ValueError: If [`highlight_elevation`][(c).] is negative.
117
125
  """
118
126
 
119
127
  hover_elevation: Optional[Number] = None
@@ -121,6 +129,9 @@ class FloatingActionButton(LayoutControl):
121
129
  The elevation of this button it is enabled and being hovered over.
122
130
 
123
131
  Defaults to `8`.
132
+
133
+ Raises:
134
+ ValueError: If [`hover_elevation`][(c).] is negative.
124
135
  """
125
136
 
126
137
  hover_color: Optional[ColorValue] = None
@@ -34,9 +34,6 @@ class IconButton(LayoutControl, AdaptiveControl):
34
34
 
35
35
  Icon buttons are commonly used in the toolbars, but they can be used in many other
36
36
  places as well.
37
-
38
- Raises:
39
- ValueError: If [`splash_radius`][(c).] is not greater than `0`.
40
37
  """
41
38
 
42
39
  icon: Optional[IconDataOrControl] = None
@@ -136,6 +133,9 @@ class IconButton(LayoutControl, AdaptiveControl):
136
133
  Note:
137
134
  This value is honoured only when in Material 2
138
135
  ([`Theme.use_material3`][flet.] is `False`).
136
+
137
+ Raises:
138
+ ValueError: If [`splash_radius`][(c).] is not greater than `0`.
139
139
  """
140
140
 
141
141
  alignment: Optional[Alignment] = None
@@ -81,11 +81,6 @@ class NavigationRail(LayoutControl):
81
81
  """
82
82
  A material widget that is meant to be displayed at the left or right of an app to
83
83
  navigate between a small number of views, typically between three and five.
84
-
85
- Raises:
86
- ValueError: If [`elevation`][(c).] is negative.
87
- ValueError: If [`min_width`][(c).] is negative.
88
- ValueError: If [`min_extended_width`][(c).] is negative.
89
84
  """
90
85
 
91
86
  destinations: list[NavigationRailDestination] = field(default_factory=list)
@@ -101,6 +96,9 @@ class NavigationRail(LayoutControl):
101
96
  Controls the size of the shadow below the NavigationRail.
102
97
 
103
98
  Defaults to `0.0`.
99
+
100
+ Raises:
101
+ ValueError: If [`elevation`][(c).] is negative.
104
102
  """
105
103
 
106
104
  selected_index: Optional[int] = None
@@ -180,6 +178,9 @@ class NavigationRail(LayoutControl):
180
178
  This value also defines the min width and min height of the destinations.
181
179
 
182
180
  To make a compact rail, set this to `56` and use `label_type='none'`.
181
+
182
+ Raises:
183
+ ValueError: If [`min_width`][(c).] is negative.
183
184
  """
184
185
 
185
186
  min_extended_width: Optional[Number] = None
@@ -187,6 +188,9 @@ class NavigationRail(LayoutControl):
187
188
  The final width when the animation is complete for setting `extended` to `True`.
188
189
 
189
190
  Defaults to `256`.
191
+
192
+ Raises:
193
+ ValueError: If [`min_extended_width`][(c).] is negative.
190
194
  """
191
195
 
192
196
  group_alignment: Optional[Number] = None
@@ -23,14 +23,14 @@ class OutlinedButton(LayoutControl, AdaptiveControl):
23
23
  Outlined buttons are medium-emphasis buttons. They contain actions that are
24
24
  important, but aren't the primary action in an app. Outlined buttons pair well with
25
25
  filled buttons to indicate an alternative, secondary action.
26
-
27
- Raises:
28
- ValueError: If neither [`icon`][(c).] nor [`content`][(c).] is provided.
29
26
  """
30
27
 
31
28
  content: Optional[StrOrControl] = None
32
29
  """
33
30
  A Control representing custom button content.
31
+
32
+ Raises:
33
+ ValueError: If neither [`icon`][(c).] nor [`content`][(c).] is provided.
34
34
  """
35
35
 
36
36
  icon: Optional[IconDataOrControl] = None
@@ -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
- The slider's left thumb is drawn at a position that corresponds to this value.
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
@@ -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
@@ -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
@@ -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
@@ -133,12 +133,6 @@ class TextField(FormFieldControl, AdaptiveControl):
133
133
  """
134
134
  A text field lets the user enter text, either with hardware keyboard or with an
135
135
  onscreen keyboard.
136
-
137
- Raises:
138
- ValueError: If [`min_lines`][(c).] is not positive.
139
- ValueError: If [`max_lines`][(c).] is not positive.
140
- ValueError: If [`min_lines`][(c).] is greater than [`max_lines`][(c).].
141
- ValueError: If [`max_length`][(c).] is not -1 or positive.
142
136
  """
143
137
 
144
138
  value: str = ""
@@ -164,6 +158,10 @@ class TextField(FormFieldControl, AdaptiveControl):
164
158
  that can be entered into the field.
165
159
 
166
160
  Defaults to `1`.
161
+
162
+ Raises:
163
+ ValueError: If [`min_lines`][(c).] is not positive or exceeds
164
+ [`max_lines`][(c).] when both are set.
167
165
  """
168
166
 
169
167
  max_lines: Optional[int] = None
@@ -175,11 +173,18 @@ class TextField(FormFieldControl, AdaptiveControl):
175
173
 
176
174
  If this is `1` (the default), the text will not wrap, but will scroll horizontally
177
175
  instead.
176
+
177
+ Raises:
178
+ ValueError: If [`max_lines`][(c).] is not positive or is less than
179
+ [`min_lines`][(c).].
178
180
  """
179
181
 
180
182
  max_length: Optional[int] = None
181
183
  """
182
184
  Limits a maximum number of characters that can be entered into TextField.
185
+
186
+ Raises:
187
+ ValueError: If [`max_length`][(c).] is neither `-1` nor a positive integer.
183
188
  """
184
189
 
185
190
  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/version.py CHANGED
@@ -10,7 +10,7 @@ from flet.utils import is_mobile, is_windows, which
10
10
  DEFAULT_VERSION = "0.1.0"
11
11
 
12
12
  # will be replaced by CI
13
- version = "0.70.0.dev6214"
13
+ version = "0.70.0.dev6232"
14
14
 
15
15
 
16
16
  def update_version():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet
3
- Version: 0.70.0.dev6214
3
+ Version: 0.70.0.dev6232
4
4
  Summary: Flet for Python - easily build interactive multi-platform apps in Python
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0