flet 0.70.0.dev5620__py3-none-any.whl → 0.70.0.dev5771__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 (124) hide show
  1. flet/__init__.py +2 -0
  2. flet/controls/adaptive_control.py +16 -13
  3. flet/controls/base_page.py +5 -5
  4. flet/controls/border.py +4 -3
  5. flet/controls/box.py +6 -11
  6. flet/controls/buttons.py +7 -7
  7. flet/controls/context.py +2 -2
  8. flet/controls/control.py +18 -11
  9. flet/controls/core/animated_switcher.py +9 -13
  10. flet/controls/core/canvas/canvas.py +1 -1
  11. flet/controls/core/canvas/line.py +2 -3
  12. flet/controls/core/canvas/oval.py +1 -1
  13. flet/controls/core/canvas/shape.py +10 -10
  14. flet/controls/core/canvas/text.py +1 -1
  15. flet/controls/core/column.py +5 -5
  16. flet/controls/core/dismissible.py +8 -8
  17. flet/controls/core/drag_target.py +5 -4
  18. flet/controls/core/draggable.py +19 -14
  19. flet/controls/core/grid_view.py +2 -2
  20. flet/controls/core/image.py +1 -1
  21. flet/controls/core/interactive_viewer.py +2 -2
  22. flet/controls/core/list_view.py +7 -7
  23. flet/controls/core/markdown.py +1 -1
  24. flet/controls/core/pagelet.py +10 -10
  25. flet/controls/core/reorderable_draggable.py +1 -1
  26. flet/controls/core/responsive_row.py +7 -7
  27. flet/controls/core/row.py +8 -8
  28. flet/controls/core/semantics.py +9 -6
  29. flet/controls/core/shader_mask.py +3 -3
  30. flet/controls/core/stack.py +4 -4
  31. flet/controls/core/text.py +7 -7
  32. flet/controls/core/text_span.py +4 -4
  33. flet/controls/core/transparent_pointer.py +3 -3
  34. flet/controls/core/view.py +16 -16
  35. flet/controls/core/window.py +1 -1
  36. flet/controls/core/window_drag_area.py +1 -1
  37. flet/controls/cupertino/cupertino_action_sheet.py +19 -8
  38. flet/controls/cupertino/cupertino_activity_indicator.py +5 -6
  39. flet/controls/cupertino/cupertino_alert_dialog.py +7 -10
  40. flet/controls/cupertino/cupertino_app_bar.py +34 -34
  41. flet/controls/cupertino/cupertino_bottom_sheet.py +5 -5
  42. flet/controls/cupertino/cupertino_button.py +4 -4
  43. flet/controls/cupertino/cupertino_checkbox.py +33 -40
  44. flet/controls/cupertino/cupertino_context_menu.py +7 -6
  45. flet/controls/cupertino/cupertino_context_menu_action.py +2 -4
  46. flet/controls/cupertino/cupertino_date_picker.py +35 -37
  47. flet/controls/cupertino/cupertino_dialog_action.py +12 -9
  48. flet/controls/cupertino/cupertino_list_tile.py +24 -36
  49. flet/controls/cupertino/cupertino_navigation_bar.py +10 -11
  50. flet/controls/cupertino/cupertino_picker.py +11 -10
  51. flet/controls/cupertino/cupertino_radio.py +10 -13
  52. flet/controls/cupertino/cupertino_segmented_button.py +9 -12
  53. flet/controls/cupertino/cupertino_slider.py +6 -9
  54. flet/controls/cupertino/cupertino_sliding_segmented_button.py +14 -17
  55. flet/controls/cupertino/cupertino_switch.py +30 -41
  56. flet/controls/cupertino/cupertino_textfield.py +14 -18
  57. flet/controls/cupertino/cupertino_timer_picker.py +11 -8
  58. flet/controls/exceptions.py +5 -5
  59. flet/controls/icon_data.py +2 -2
  60. flet/controls/keys.py +2 -1
  61. flet/controls/layout_control.py +22 -27
  62. flet/controls/material/alert_dialog.py +44 -50
  63. flet/controls/material/app_bar.py +41 -45
  64. flet/controls/material/auto_complete.py +10 -8
  65. flet/controls/material/badge.py +32 -28
  66. flet/controls/material/banner.py +14 -14
  67. flet/controls/material/bottom_app_bar.py +7 -9
  68. flet/controls/material/bottom_sheet.py +10 -10
  69. flet/controls/material/button.py +2 -24
  70. flet/controls/material/card.py +10 -11
  71. flet/controls/material/checkbox.py +41 -49
  72. flet/controls/material/chip.py +44 -47
  73. flet/controls/material/circle_avatar.py +19 -22
  74. flet/controls/material/container.py +16 -123
  75. flet/controls/material/datatable.py +71 -95
  76. flet/controls/material/date_picker.py +13 -14
  77. flet/controls/material/date_range_picker.py +183 -0
  78. flet/controls/material/divider.py +24 -23
  79. flet/controls/material/dropdown.py +21 -13
  80. flet/controls/material/expansion_tile.py +5 -6
  81. flet/controls/material/filled_button.py +1 -1
  82. flet/controls/material/floating_action_button.py +2 -2
  83. flet/controls/material/form_field_control.py +64 -56
  84. flet/controls/material/icon_button.py +29 -65
  85. flet/controls/material/list_tile.py +41 -32
  86. flet/controls/material/menu_item_button.py +2 -2
  87. flet/controls/material/navigation_bar.py +3 -3
  88. flet/controls/material/navigation_rail.py +11 -11
  89. flet/controls/material/outlined_button.py +1 -1
  90. flet/controls/material/popup_menu_button.py +3 -3
  91. flet/controls/material/progress_bar.py +15 -22
  92. flet/controls/material/progress_ring.py +8 -8
  93. flet/controls/material/radio.py +3 -8
  94. flet/controls/material/range_slider.py +1 -1
  95. flet/controls/material/search_bar.py +15 -16
  96. flet/controls/material/segmented_button.py +4 -4
  97. flet/controls/material/selection_area.py +4 -3
  98. flet/controls/material/slider.py +16 -16
  99. flet/controls/material/snack_bar.py +33 -32
  100. flet/controls/material/submenu_button.py +9 -9
  101. flet/controls/material/switch.py +13 -13
  102. flet/controls/material/tabs.py +77 -78
  103. flet/controls/material/text_button.py +2 -2
  104. flet/controls/material/textfield.py +4 -6
  105. flet/controls/material/tooltip.py +16 -15
  106. flet/controls/material/vertical_divider.py +10 -10
  107. flet/controls/page.py +4 -4
  108. flet/controls/painting.py +2 -2
  109. flet/controls/scrollable_control.py +1 -1
  110. flet/controls/services/file_picker.py +7 -7
  111. flet/controls/services/haptic_feedback.py +1 -1
  112. flet/controls/services/shake_detector.py +1 -1
  113. flet/controls/services/storage_paths.py +3 -3
  114. flet/controls/text_style.py +1 -1
  115. flet/controls/theme.py +669 -608
  116. flet/controls/types.py +11 -11
  117. flet/testing/flet_test_app.py +4 -4
  118. flet/version.py +1 -1
  119. {flet-0.70.0.dev5620.dist-info → flet-0.70.0.dev5771.dist-info}/METADATA +5 -5
  120. flet-0.70.0.dev5771.dist-info/RECORD +239 -0
  121. flet-0.70.0.dev5620.dist-info/RECORD +0 -238
  122. {flet-0.70.0.dev5620.dist-info → flet-0.70.0.dev5771.dist-info}/WHEEL +0 -0
  123. {flet-0.70.0.dev5620.dist-info → flet-0.70.0.dev5771.dist-info}/entry_points.txt +0 -0
  124. {flet-0.70.0.dev5620.dist-info → flet-0.70.0.dev5771.dist-info}/top_level.txt +0 -0
@@ -33,7 +33,7 @@ class FormFieldControl(LayoutControl):
33
33
 
34
34
  text_style: TextStyle = field(default_factory=lambda: TextStyle())
35
35
  """
36
- The [`TextStyle`][flet.TextStyle] to use for the
36
+ The [`TextStyle`][flet.] to use for the
37
37
  text being edited.
38
38
  """
39
39
 
@@ -42,7 +42,7 @@ class FormFieldControl(LayoutControl):
42
42
  Defines how the text should be aligned vertically.
43
43
 
44
44
  Value can either be a number ranging from `-1.0` (topmost location) to `1.0`
45
- (bottommost location) or of type [`VerticalAlignment`][flet.VerticalAlignment]
45
+ (bottommost location) or of type [`VerticalAlignment`][flet.]
46
46
  Defaults to `VerticalAlignment.CENTER`.
47
47
  """
48
48
 
@@ -59,8 +59,7 @@ class FormFieldControl(LayoutControl):
59
59
 
60
60
  label_style: Optional[TextStyle] = None
61
61
  """
62
- The [`TextStyle`][flet.TextStyle] to use for
63
- `label`.
62
+ The text style to use for `label`.
64
63
  """
65
64
 
66
65
  icon: Optional[IconDataOrControl] = None
@@ -80,8 +79,10 @@ class FormFieldControl(LayoutControl):
80
79
 
81
80
  bgcolor: Optional[ColorValue] = None
82
81
  """
83
- TextField background color. Will not be
84
- visible if `filled=False`.
82
+ TextField background color.
83
+
84
+ Note:
85
+ Will not be visible if [`filled`][flet.FormFieldControl.] is `False`.
85
86
  """
86
87
 
87
88
  border_radius: Optional[BorderRadiusValue] = None
@@ -90,27 +91,33 @@ class FormFieldControl(LayoutControl):
90
91
 
91
92
  border_width: Optional[Number] = None
92
93
  """
93
- The width of the border in virtual pixels. Set to `0` to completely remove the
94
- border.
94
+ The width of the border in virtual pixels.
95
95
 
96
96
  Defaults to `1`.
97
+
98
+ Tip:
99
+ Set to `0` to completely remove the border.
97
100
  """
98
101
 
99
102
  border_color: Optional[ColorValue] = None
100
103
  """
101
- Border color. Could be `transparent` to
102
- hide the border.
104
+ The border color.
105
+
106
+ Tip:
107
+ Set to [`Colors.TRANSPARENT`][flet.] to invisible/hide the border.
103
108
  """
104
109
 
105
110
  focused_color: Optional[ColorValue] = None
106
111
  """
107
- Text color when TextField is focused.
112
+ The text's color when focused.
108
113
  """
109
114
 
110
115
  focused_bgcolor: Optional[ColorValue] = None
111
116
  """
112
- Background color of TextField in focused
113
- state. Will not be visible if `filled=False`.
117
+ Background color in focused state.
118
+
119
+ Note:
120
+ Will not be visible if [`filled`][flet.FormFieldControl.] is `False`.
114
121
  """
115
122
 
116
123
  focused_border_width: Optional[Number] = None
@@ -130,22 +137,26 @@ class FormFieldControl(LayoutControl):
130
137
 
131
138
  dense: Optional[bool] = None
132
139
  """
133
- Whether the TextField is part of a dense form (ie, uses less vertical space).
140
+ Whether this control is part of a dense form (ie, uses less vertical space).
134
141
  """
135
142
 
136
143
  filled: Optional[bool] = None
137
144
  """
138
- If `True` the decoration's container is filled with theme `fill_color`.
145
+ If `True` the decoration's container is filled with theme
146
+ [`fill_color`][flet.FormFieldControl.].
139
147
 
140
- If `filled=None`(default), then it is implicitly set to `True` when at least one of
141
- the following is not `None`: `fill_color`, `focused_bgcolor`, `hover_color` and
142
- `bgcolor`.
148
+ If `filled=None` (the default), then it is implicitly set to `True` when at least
149
+ one of the following is not `None`: [`fill_color`][flet.FormFieldControl.],
150
+ [`focused_bgcolor`][flet.FormFieldControl.],
151
+ [`hover_color`][flet.FormFieldControl.] and [`bgcolor`][flet.FormFieldControl.].
143
152
  """
144
153
 
145
154
  fill_color: Optional[ColorValue] = None
146
155
  """
147
- Background color of TextField. Will not
148
- be visible if `filled=False`.
156
+ Background color of TextField.
157
+
158
+ Note:
159
+ Will not be visible if [`filled`][flet.FormFieldControl.] is `False`.
149
160
  """
150
161
 
151
162
  focus_color: Optional[ColorValue] = None
@@ -160,22 +171,23 @@ class FormFieldControl(LayoutControl):
160
171
 
161
172
  hover_color: Optional[ColorValue] = None
162
173
  """
163
- Background color of TextField when
164
- hovered. Will not be visible if `filled=False`.
174
+ Background color of TextField when hovered.
175
+
176
+ Note:
177
+ Will not be visible if [`filled`][flet.FormFieldControl.] is `False`.
165
178
  """
166
179
 
167
180
  hint_text: Optional[str] = None
168
181
  """
169
182
  Text that suggests what sort of input the field accepts.
170
183
 
171
- Displayed on top of the input when the it's empty and either (a) `label` is null or
172
- (b) the input has the focus.
184
+ Displayed on top of the input when the it's empty and either
185
+ (a) [`label`][flet.FormFieldControl.] is `None` or (b) the input has the focus.
173
186
  """
174
187
 
175
188
  hint_style: Optional[TextStyle] = None
176
189
  """
177
- The [`TextStyle`][flet.TextStyle] to use for
178
- `hint_text`.
190
+ The text style to use for [`hint_text`][flet.FormFieldControl.].
179
191
  """
180
192
 
181
193
  hint_fade_duration: Optional[DurationValue] = None
@@ -194,14 +206,14 @@ class FormFieldControl(LayoutControl):
194
206
  used.
195
207
 
196
208
  If non-null, the text is displayed below the input decorator, in the same location
197
- as `error_text`. If a non-null `error_text` value is specified then the helper text
198
- is not shown.
209
+ as [`error`][flet.FormFieldControl.]. If a non-null
210
+ [`error`][flet.FormFieldControl.] value is specified then the helper text is not
211
+ shown.
199
212
  """
200
213
 
201
214
  helper_style: Optional[TextStyle] = None
202
215
  """
203
- The [`TextStyle`][flet.TextStyle] to use for
204
- `helper_text`.
216
+ The text style to use for [`helper`][flet.FormFieldControl.].
205
217
  """
206
218
 
207
219
  helper_max_lines: Optional[int] = None
@@ -213,27 +225,25 @@ class FormFieldControl(LayoutControl):
213
225
  """
214
226
  A `Control` to place below the line as a character count.
215
227
 
216
- If `None` or an empty string and `counter_text` isn't specified, then nothing will
217
- appear in the counter's location.
228
+ If `None` or an empty string then nothing will appear in the counter's location.
218
229
  """
219
230
 
220
231
  counter_style: Optional[TextStyle] = None
221
232
  """
222
- The [`TextStyle`][flet.TextStyle] to use for
223
- `counter_text`.
233
+ The text style to use for `counter`.
224
234
  """
225
235
 
226
236
  error: Optional[StrOrControl] = None
227
237
  """
228
238
  Text that appears below the input border.
229
239
 
230
- If non-null, the border's color animates to red and the `helper_text` is not shown.
240
+ If non-null, the border's color animates to red
241
+ and the [`helper`][flet.FormFieldControl.] is not shown.
231
242
  """
232
243
 
233
244
  error_style: Optional[TextStyle] = None
234
245
  """
235
- The [`TextStyle`][flet.TextStyle] to use for
236
- `error_text`.
246
+ The text style to use for [`error`][flet.FormFieldControl.].
237
247
  """
238
248
 
239
249
  error_max_lines: Optional[int] = None
@@ -243,21 +253,22 @@ class FormFieldControl(LayoutControl):
243
253
 
244
254
  prefix: Optional[StrOrControl] = None
245
255
  """
246
- Optional `Control` to place on the line before the input.
256
+ A `Control` to place on the line before the input.
257
+
258
+ It appears after the [`prefix_icon`][flet.FormFieldControl.], if both are specified.
247
259
 
248
260
  This can be used, for example, to add some padding to text that would otherwise be
249
- specified using `prefix_text`, or to add a custom control in front of the input.
261
+ specified using `prefix`, or to add a custom control in front of the input.
250
262
  The control's baseline is lined up with the input baseline.
251
-
252
- Only one of `prefix` and `prefix_text` can be specified.
253
-
254
- The `prefix` appears after the `prefix_icon`, if both are specified.
255
263
  """
256
264
 
257
265
  prefix_icon: Optional[IconDataOrControl] = None
258
266
  """
259
- An icon that appears before the `prefix` or `prefix_text` and before the editable
260
- part of the text field, within the decoration's container.
267
+ An icon that appears before the editable part of the text field,
268
+ within the decoration's container.
269
+
270
+ If [`prefix`][flet.FormFieldControl.] is specified and visible,
271
+ this icon will appear to its left.
261
272
  """
262
273
 
263
274
  prefix_icon_size_constraints: Optional[BoxConstraints] = None
@@ -267,27 +278,25 @@ class FormFieldControl(LayoutControl):
267
278
 
268
279
  prefix_style: Optional[TextStyle] = None
269
280
  """
270
- The [`TextStyle`][flet.TextStyle] to use for
271
- `prefix_text`.
281
+ The text style to use for [`prefix`][flet.FormFieldControl.].
272
282
  """
273
283
 
274
284
  suffix: Optional[StrOrControl] = None
275
285
  """
276
- Optional `Control` to place on the line after the input.
286
+ A `Control` to place on the line after the input.
287
+
288
+ It appears before the [`suffix_icon`][flet.FormFieldControl.],
289
+ if both are specified.
277
290
 
278
291
  This can be used, for example, to add some padding to the text that would otherwise
279
- be specified using `suffix_text`, or to add a custom control after the input.
292
+ be specified using `suffix`, or to add a custom control after the input.
280
293
  The control's baseline is lined up with the input baseline.
281
-
282
- Only one of `suffix` and `suffix_text` can be specified.
283
-
284
- The `suffix` appears before the `suffix_icon`, if both are specified.
285
294
  """
286
295
 
287
296
  suffix_icon: Optional[IconDataOrControl] = None
288
297
  """
289
298
  An icon that appears after the editable part of the text field and after the
290
- `suffix` or `suffix_text`, within the decoration's container.
299
+ [`suffix`][flet.FormFieldControl.], within the decoration's container.
291
300
  """
292
301
 
293
302
  suffix_icon_size_constraints: Optional[BoxConstraints] = None
@@ -312,8 +321,7 @@ class FormFieldControl(LayoutControl):
312
321
 
313
322
  suffix_style: Optional[TextStyle] = None
314
323
  """
315
- The [`TextStyle`][flet.TextStyle] to use for
316
- `suffix_text`.
324
+ The text style to use for [`suffix`][flet.FormFieldControl.].
317
325
  """
318
326
 
319
327
  async def focus(self):
@@ -38,28 +38,28 @@ class IconButton(LayoutControl, AdaptiveControl):
38
38
 
39
39
  icon: Optional[IconDataOrControl] = None
40
40
  """
41
- Icon shown in the button.
41
+ An icon to be shown in this button.
42
42
  """
43
43
 
44
44
  icon_color: Optional[ColorValue] = None
45
45
  """
46
- The foreground color of the icon.
46
+ The foreground color of the [`icon`][flet.IconButton.].
47
47
  """
48
48
 
49
49
  icon_size: Optional[Number] = None
50
50
  """
51
- The [`icon`][flet.IconButton.icon]'s size in virtual pixels.
51
+ The [`icon`][flet.IconButton.]'s size in virtual pixels.
52
52
 
53
53
  Defaults to `24`.
54
54
  """
55
55
 
56
56
  selected: Optional[bool] = None
57
57
  """
58
- The optional selection state of the icon button.
58
+ The optional selection state of this button.
59
59
 
60
60
  If this property is not set, the button will behave as a normal push button,
61
- otherwise, the button will toggle between showing [`icon`][flet.IconButton.icon]
62
- (when `False`), and [`selected_icon`][flet.IconButton.selected_icon] (when `True`).
61
+ otherwise, the button will toggle between showing [`icon`][flet.IconButton.]
62
+ (when `False`), and [`selected_icon`][flet.IconButton.] (when `True`).
63
63
  """
64
64
 
65
65
  selected_icon: Optional[IconDataOrControl] = None
@@ -70,47 +70,17 @@ class IconButton(LayoutControl, AdaptiveControl):
70
70
  selected_icon_color: Optional[ColorValue] = None
71
71
  """
72
72
  The icon color for the 'selected' state of this button.
73
-
74
- An example of icon toggle button:
75
-
76
- <img src="/img/blog/gradients/toggle-icon-button.gif" className="screenshot-10" />
77
-
78
- ```python
79
- import flet as ft
80
-
81
- def main(page: ft.Page):
82
-
83
- def toggle_icon_button(e):
84
- e.control.selected = not e.control.selected
85
-
86
- page.add(
87
- ft.IconButton(
88
- icon=ft.Icons.BATTERY_1_BAR,
89
- selected_icon=ft.Icons.BATTERY_FULL,
90
- on_click=toggle_icon_button,
91
- selected=False,
92
- style=ft.ButtonStyle(
93
- color={
94
- ft.ControlState.SELECTED: ft.Colors.GREEN,
95
- ft.ControlState.DEFAULT: ft.Colors.RED
96
- },
97
- ),
98
- )
99
- )
100
-
101
- ft.run(main)
102
- ```
103
73
  """
104
74
 
105
75
  bgcolor: Optional[ColorValue] = field(default=None, metadata={"skip": True})
106
76
  """
107
- The button's background color.
77
+ The background color of this button.
108
78
  """
109
79
 
110
80
  highlight_color: Optional[ColorValue] = None
111
81
  """
112
- The button's color when the button is
113
- pressed. The highlight fades in quickly as the button is held down.
82
+ The color of this button when it is pressed.
83
+ The highlight fades in quickly as this button is pressed/held down.
114
84
  """
115
85
 
116
86
  style: Optional[ButtonStyle] = None
@@ -118,18 +88,15 @@ class IconButton(LayoutControl, AdaptiveControl):
118
88
  Customizes this button's appearance.
119
89
 
120
90
  Note:
121
- - Only honoured in Material 3 design
122
- ([`Theme.use_material3`][flet.Theme.use_material3] is `True` - default).
123
- - If [`Theme.use_material3`][flet.Theme.use_material3] is `True`,
91
+ - Only honoured in Material 3 design ([`Theme.use_material3`][flet.] is `True`).
92
+ - If [`Theme.use_material3`][flet.] is `True`,
124
93
  any parameters defined in style will be overridden by the
125
- corresponding parameters in this `IconButton`.
126
- For example, if icon button
127
- [`visual_density`][flet.IconButton.visual_density]
128
- is set to [`VisualDensity.STANDARD`][flet.VisualDensity.STANDARD] and
129
- style's [`visual_density`][flet.ButtonStyle.visual_density] is
130
- set to [`VisualDensity.COMPACT`][flet.VisualDensity.COMPACT], the icon
131
- button will have [`VisualDensity.STANDARD`][flet.VisualDensity.STANDARD]
132
- to define the button's layout.
94
+ corresponding parameters in this button.
95
+ For example, if icon button [`visual_density`][flet.IconButton.]
96
+ is set to [`VisualDensity.STANDARD`][flet.] and
97
+ style's [`visual_density`][flet.ButtonStyle.] is
98
+ set to [`VisualDensity.COMPACT`][flet.], [`VisualDensity.STANDARD`][flet.]
99
+ will be used.
133
100
  """
134
101
 
135
102
  autofocus: bool = False
@@ -141,8 +108,7 @@ class IconButton(LayoutControl, AdaptiveControl):
141
108
 
142
109
  disabled_color: Optional[ColorValue] = None
143
110
  """
144
- The color to use for the icon inside the
145
- button when disabled.
111
+ The color to use for the icon inside the button when disabled.
146
112
  """
147
113
 
148
114
  hover_color: Optional[ColorValue] = None
@@ -157,8 +123,7 @@ class IconButton(LayoutControl, AdaptiveControl):
157
123
 
158
124
  splash_color: Optional[ColorValue] = None
159
125
  """
160
- The primary color of the button when the
161
- button is in the down (pressed) state.
126
+ The primary color of this button when it is in the pressed state.
162
127
  """
163
128
 
164
129
  splash_radius: Optional[Number] = None
@@ -167,15 +132,14 @@ class IconButton(LayoutControl, AdaptiveControl):
167
132
 
168
133
  Note:
169
134
  This value is honoured only when in Material 2
170
- ([`Theme.use_material3`][flet.Theme.use_material3] is `False`).
135
+ ([`Theme.use_material3`][flet.] is `False`).
171
136
  """
172
137
 
173
138
  alignment: Optional[Alignment] = None
174
139
  """
175
- Defines how the icon is positioned within the IconButton. Alignment is an instance
176
- of [`Alignment`][flet.Alignment] class.
140
+ Defines how the icon is positioned within this button.
177
141
 
178
- Defaults to [`Alignment.CENTER`][flet.Alignment.CENTER].
142
+ Defaults to [`Alignment.CENTER`][flet.].
179
143
  """
180
144
 
181
145
  padding: Optional[PaddingValue] = None
@@ -197,7 +161,7 @@ class IconButton(LayoutControl, AdaptiveControl):
197
161
  """
198
162
  The URL to open when this button is clicked.
199
163
 
200
- Additionally, if [`on_click`][flet.IconButton.on_click] event callback is provided,
164
+ Additionally, if [`on_click`][flet.IconButton.] event callback is provided,
201
165
  it is fired after that.
202
166
  """
203
167
 
@@ -211,7 +175,7 @@ class IconButton(LayoutControl, AdaptiveControl):
211
175
  default=None, metadata={"skip": True}
212
176
  )
213
177
  """
214
- Defines how compact the control's layout will be.
178
+ Defines how compact this button's layout will be.
215
179
  """
216
180
 
217
181
  size_constraints: Optional[BoxConstraints] = None
@@ -226,12 +190,12 @@ class IconButton(LayoutControl, AdaptiveControl):
226
190
 
227
191
  on_focus: Optional[ControlEventHandler["IconButton"]] = None
228
192
  """
229
- Called when the control has received focus.
193
+ Called when this button has received focus.
230
194
  """
231
195
 
232
196
  on_blur: Optional[ControlEventHandler["IconButton"]] = None
233
197
  """
234
- Called when the control has lost focus.
198
+ Called when this button has lost focus.
235
199
  """
236
200
 
237
201
  def before_update(self):
@@ -261,7 +225,7 @@ class IconButton(LayoutControl, AdaptiveControl):
261
225
  @control("FilledIconButton")
262
226
  class FilledIconButton(IconButton):
263
227
  """
264
- A filled variant of [`IconButton`][flet.IconButton].
228
+ A filled variant of [`IconButton`][flet.].
265
229
 
266
230
  Filled icon buttons have higher visual impact and should be used for high emphasis
267
231
  actions, such as turning off a microphone or camera.
@@ -271,7 +235,7 @@ class FilledIconButton(IconButton):
271
235
  @control("FilledTonalIconButton")
272
236
  class FilledTonalIconButton(IconButton):
273
237
  """
274
- A filled tonal variant of [`IconButton`][flet.IconButton].
238
+ A filled tonal variant of [`IconButton`][flet.].
275
239
 
276
240
  Filled tonal icon buttons are a middle ground between filled and
277
241
  outlined icon buttons. They're useful in contexts where the button requires
@@ -283,7 +247,7 @@ class FilledTonalIconButton(IconButton):
283
247
  @control("OutlinedIconButton")
284
248
  class OutlinedIconButton(IconButton):
285
249
  """
286
- An outlined variant of [`IconButton`][flet.IconButton].
250
+ An outlined variant of [`IconButton`][flet.].
287
251
 
288
252
  Outlined icon buttons are medium-emphasis buttons.
289
253
  They're useful when an icon button needs more emphasis than a