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
@@ -40,31 +40,31 @@ __all__ = [
40
40
 
41
41
  class TabAlignment(Enum):
42
42
  """
43
- Defines how tabs are aligned horizontally in a [`Tabs`][flet.Tabs].
43
+ Defines how tabs are aligned horizontally in a [`Tabs`][flet.].
44
44
  """
45
45
 
46
46
  START = "start"
47
47
  """
48
- If [`TabBar.scrollable`][flet.TabBar.scrollable] is `True`,
49
- tabs are aligned to the start of the [`TabBar`][flet.TabBar].
48
+ If [`TabBar.scrollable`][flet.] is `True`,
49
+ tabs are aligned to the start of the [`TabBar`][flet.].
50
50
  """
51
51
 
52
52
  START_OFFSET = "startOffset"
53
53
  """
54
- If [`TabBar.scrollable`][flet.TabBar.scrollable] is `True`,
54
+ If [`TabBar.scrollable`][flet.] is `True`,
55
55
  tabs are aligned to the start of the
56
- [`TabBar`][flet.TabBar] with an offset of `52.0` pixels.
56
+ [`TabBar`][flet.] with an offset of `52.0` pixels.
57
57
  """
58
58
 
59
59
  FILL = "fill"
60
60
  """
61
- If [`TabBar.scrollable`][flet.TabBar.scrollable] is `False`,
62
- tabs are stretched to fill the [`TabBar`][flet.TabBar].
61
+ If [`TabBar.scrollable`][flet.] is `False`,
62
+ tabs are stretched to fill the [`TabBar`][flet.].
63
63
  """
64
64
 
65
65
  CENTER = "center"
66
66
  """
67
- Tabs are aligned to the center of the [`TabBar`][flet.TabBar].
67
+ Tabs are aligned to the center of the [`TabBar`][flet.].
68
68
  """
69
69
 
70
70
 
@@ -110,7 +110,7 @@ class TabBarHoverEvent(Event["TabBar"]):
110
110
  hovering: bool
111
111
  """
112
112
  Whether a pointer has entered (`True`) or exited (`False`) the tab bar
113
- at [`index`][flet.TabBarHoverEvent.index].
113
+ at [`index`][(c).].
114
114
  """
115
115
 
116
116
  index: int
@@ -132,10 +132,10 @@ class UnderlineTabIndicator:
132
132
  """
133
133
  Locates the selected tab's underline relative to the tab's boundary.
134
134
 
135
- The [`TabBar.indicator_size`][flet.TabBar.indicator_size] property can be used
135
+ The [`TabBar.indicator_size`][flet.] property can be used
136
136
  to define the tab indicator's bounds in terms of its (centered) tab control with
137
- [`TabBarIndicatorSize.LABEL`][flet.TabBarIndicatorSize.LABEL], or the entire tab
138
- with [`TabBarIndicatorSize.TAB`][flet.TabBarIndicatorSize.TAB].
137
+ [`TabBarIndicatorSize.LABEL`][flet.], or the entire tab
138
+ with [`TabBarIndicatorSize.TAB`][flet.].
139
139
  """
140
140
 
141
141
  border_radius: Optional[BorderRadiusValue] = None
@@ -155,7 +155,7 @@ class Tabs(LayoutControl, AdaptiveControl):
155
155
  on text headers to articulate the different sections of content.
156
156
 
157
157
  Raises:
158
- ValueError: If [`length`][flet.Tabs.length] is negative.
158
+ ValueError: If [`length`][(c).] is negative.
159
159
  IndexError: If [`selected_index`][(c).] is not in the range
160
160
  `[-length, length - 1]`.
161
161
  """
@@ -172,8 +172,8 @@ class Tabs(LayoutControl, AdaptiveControl):
172
172
  Typically greater than one.
173
173
 
174
174
  Note:
175
- Must match the length of both [`TabBar.tabs`][flet.TabBar.tabs]
176
- and [`TabBarView.controls`][flet.TabBarView.controls]. Don't forget to update
175
+ Must match the length of both [`TabBar.tabs`][flet.]
176
+ and [`TabBarView.controls`][flet.]. Don't forget to update
177
177
  it when adding/removing tabs.
178
178
  """
179
179
 
@@ -187,11 +187,10 @@ class Tabs(LayoutControl, AdaptiveControl):
187
187
  Note:
188
188
  - Must be in range `[-length, length - 1]`.
189
189
  - Changing the value of this property will internally trigger
190
- [`move_to`][flet.Tabs.move_to] with
191
- [`animation_duration`][flet.Tabs.animation_duration] and
192
- [`Curve.EASE`][flet.AnimationCurve.EASE] animation curve. To specify
190
+ [`move_to`][(c).] with [`animation_duration`][(c).] and
191
+ [`AnimationCurve.EASE`][flet.] animation curve. To specify
193
192
  a different animation curve or duration for this particular change,
194
- use [`move_to`][flet.Tabs.move_to] directly.
193
+ use [`move_to`][(c).] directly.
195
194
  """
196
195
 
197
196
  animation_duration: DurationValue = field(
@@ -204,9 +203,9 @@ class Tabs(LayoutControl, AdaptiveControl):
204
203
 
205
204
  on_change: Optional[ControlEventHandler["Tabs"]] = None
206
205
  """
207
- Called when [`selected_index`][flet.Tabs.selected_index] changes.
206
+ Called when [`selected_index`][(c).] changes.
208
207
 
209
- The [`data`][flet.Event.data] property of the event handler argument
208
+ The [`data`][flet.Event.] property of the event handler argument
210
209
  contains the index of the selected tab.
211
210
  """
212
211
 
@@ -231,8 +230,8 @@ class Tabs(LayoutControl, AdaptiveControl):
231
230
  """
232
231
  Selects the tab at the given `index`.
233
232
 
234
- Additionally, it triggers [`on_change`][flet.Tabs.on_change] event and updates
235
- [`selected_index`][flet.Tabs.selected_index].
233
+ Additionally, it triggers [`on_change`][(c).] event and updates
234
+ [`selected_index`][(c).].
236
235
 
237
236
  Note:
238
237
  If `index` is negative, it is interpreted as a Python-style negative index
@@ -244,7 +243,7 @@ class Tabs(LayoutControl, AdaptiveControl):
244
243
  `[-length, length - 1]`.
245
244
  animation_curve: The curve to apply to the animation.
246
245
  animation_duration: The duration of the animation. If `None` (the default),
247
- [`Tabs.animation_duration`][flet.Tabs.animation_duration] will be used.
246
+ [`Tabs.animation_duration`][flet.] will be used.
248
247
 
249
248
  Raises:
250
249
  IndexError: If the `index` is outside the range `[-length, length - 1]`.
@@ -281,23 +280,23 @@ class TabBarView(LayoutControl, AdaptiveControl):
281
280
 
282
281
  Note:
283
282
  The length of [`controls`][(c).] must be the same as the
284
- [`length`][flet.Tabs.length] property of the ancestor [`Tabs`][flet.Tabs].
283
+ [`length`][flet.Tabs.] property of the ancestor [`Tabs`][flet.].
285
284
  """
286
285
 
287
286
  controls: list[Control]
288
287
  """
289
288
  A list of controls, where each control represents the
290
289
  content of a corresponding tab. So, a control at index `i` in this list is
291
- displayed when the [`Tab`][flet.Tab] at index `i` is selected.
290
+ displayed when the [`Tab`][flet.] at index `i` is selected.
292
291
 
293
292
  Note:
294
293
  The length of this list must be equal to the number of tabs specified in an
295
- ancestor [`Tabs`][flet.Tabs] control.
294
+ ancestor [`Tabs`][flet.] control.
296
295
  """
297
296
 
298
297
  clip_behavior: ClipBehavior = ClipBehavior.HARD_EDGE
299
298
  """
300
- Defines how the [`controls`][flet.TabBarView.controls] will be clipped.
299
+ Defines how the [`controls`][(c).] will be clipped.
301
300
  """
302
301
 
303
302
  viewport_fraction: Number = 1.0
@@ -327,7 +326,7 @@ class TabBar(LayoutControl, AdaptiveControl):
327
326
  """
328
327
  A list of controls.
329
328
 
330
- Typically [`Tab`][flet.Tab]s.
329
+ Typically [`Tab`][flet.]s.
331
330
  """
332
331
 
333
332
  scrollable: bool = True
@@ -344,29 +343,29 @@ class TabBar(LayoutControl, AdaptiveControl):
344
343
  Specifies the horizontal alignment of the tabs within this tab bar.
345
344
 
346
345
  If this is `None`, then the value of
347
- [`TabBarTheme.tab_alignment`][flet.TabBarTheme.tab_alignment] is used.
348
- If [`TabBarTheme.tab_alignment`][flet.TabBarTheme.tab_alignment] is `None` and
349
- [`Theme.use_material3`][flet.Theme.use_material3] is `True`,
346
+ [`TabBarTheme.tab_alignment`][flet.] is used.
347
+ If [`TabBarTheme.tab_alignment`][flet.] is `None` and
348
+ [`Theme.use_material3`][flet.] is `True`,
350
349
  then [TabAlignment.START_OFFSET][flet.TabAlignment.START_OFFSET] is used if
351
- [`scrollable`][flet.TabBar.scrollable] is `True`,
352
- otherwise [`TabAlignment.FILL`][flet.TabAlignment.FILL] is used.
350
+ [`scrollable`][(c).] is `True`,
351
+ otherwise [`TabAlignment.FILL`][flet.] is used.
353
352
 
354
- If [`TabBarTheme.tab_alignment`][flet.TabBarTheme.tab_alignment] is `None`
355
- and [`Theme.use_material3`][flet.Theme.use_material3] is `False`,
356
- then [`TabAlignment.CENTER`][flet.TabAlignment.CENTER] is used if
357
- [`scrollable`][flet.TabBar.scrollable] is `True`,
358
- otherwise [`TabAlignment.FILL`][flet.TabAlignment.FILL] is used.
353
+ If [`TabBarTheme.tab_alignment`][flet.] is `None`
354
+ and [`Theme.use_material3`][flet.] is `False`,
355
+ then [`TabAlignment.CENTER`][flet.] is used if
356
+ [`scrollable`][(c).] is `True`,
357
+ otherwise [`TabAlignment.FILL`][flet.] is used.
359
358
 
360
359
  Note:
361
- - If [`scrollable`][flet.TabBar.scrollable] is `False`, then
362
- [`tab_alignment`][flet.TabBar.tab_alignment] must be either
363
- [`TabAlignment.FILL`][flet.TabAlignment.FILL] or
364
- [`TabAlignment.CENTER`][flet.TabAlignment.CENTER].
365
- - If [`scrollable`][flet.TabBar.scrollable] is `True`, then
366
- [`tab_alignment`][flet.TabBar.tab_alignment] must be
367
- [`TabAlignment.START`][flet.TabAlignment.START],
368
- [`TabAlignment.START_OFFSET`][flet.TabAlignment.START_OFFSET]
369
- or [`TabAlignment.CENTER`][flet.TabAlignment.CENTER].
360
+ - If [`scrollable`][(c).] is `False`, then
361
+ [`tab_alignment`][(c).] must be either
362
+ [`TabAlignment.FILL`][flet.] or
363
+ [`TabAlignment.CENTER`][flet.].
364
+ - If [`scrollable`][(c).] is `True`, then
365
+ [`tab_alignment`][(c).] must be
366
+ [`TabAlignment.START`][flet.],
367
+ [`TabAlignment.START_OFFSET`][flet.]
368
+ or [`TabAlignment.CENTER`][flet.].
370
369
  """
371
370
 
372
371
  divider_color: Optional[ColorValue] = None
@@ -379,24 +378,24 @@ class TabBar(LayoutControl, AdaptiveControl):
379
378
  The color of the indicator(line that appears below the selected tab).
380
379
 
381
380
  Note:
382
- Will be ignored if [`indicator`][flet.TabBar.indicator] or
383
- [`TabBarTheme.indicator`][flet.TabBarTheme.indicator] is not `None`.
381
+ Will be ignored if [`indicator`][(c).] or
382
+ [`TabBarTheme.indicator`][flet.] is not `None`.
384
383
  """
385
384
 
386
385
  indicator: Optional[UnderlineTabIndicator] = None
387
386
  """
388
387
  Defines the appearance of the selected tab indicator.
389
388
 
390
- If this or [`TabBarTheme.indicator`][flet.TabBarTheme.indicator] is not `None`,
391
- [`indicator_color`][flet.TabBar.indicator_color] and
392
- [`indicator_thickness`][flet.TabBar.indicator_thickness] properties are ignored.
389
+ If this or [`TabBarTheme.indicator`][flet.] is not `None`,
390
+ [`indicator_color`][(c).] and
391
+ [`indicator_thickness`][(c).] properties are ignored.
393
392
 
394
393
  The indicator's size is based on the tab's bounds. If
395
- [`indicator_size`][flet.TabBar.indicator_size]
396
- is [`TabBarIndicatorSize.TAB`][flet.TabBarIndicatorSize.TAB],
394
+ [`indicator_size`][(c).]
395
+ is [`TabBarIndicatorSize.TAB`][flet.],
397
396
  the tab's bounds are as wide as the space occupied by the tab in the tab bar.
398
- If [`indicator_size`][flet.TabBar.indicator_size] is
399
- [`TabBarIndicatorSize.LABEL`][flet.TabBarIndicatorSize.LABEL],
397
+ If [`indicator_size`][(c).] is
398
+ [`TabBarIndicatorSize.LABEL`][flet.],
400
399
  then the tab's bounds are only as wide as the tab control itself.
401
400
  """
402
401
 
@@ -406,14 +405,14 @@ class TabBar(LayoutControl, AdaptiveControl):
406
405
 
407
406
  The size of the selected tab indicator is defined relative to the
408
407
  tab's overall bounds if `indicator_size` is
409
- [`TabBarIndicatorSize.TAB`][flet.TabBarIndicatorSize.TAB]
408
+ [`TabBarIndicatorSize.TAB`][flet.]
410
409
  (the default) or relative to the bounds of the tab's control if
411
- `indicator_size` is [`TabBarIndicatorSize.LABEL`][flet.TabBarIndicatorSize.LABEL].
410
+ `indicator_size` is [`TabBarIndicatorSize.LABEL`][flet.].
412
411
 
413
412
  The selected tab's location appearance can be refined further with
414
- the [`indicator_color`][flet.TabBar.indicator_color],
415
- [`indicator_thickness`][flet.TabBar.indicator_thickness],
416
- and [`indicator`][flet.TabBar.indicator] properties.
413
+ the [`indicator_color`][(c).],
414
+ [`indicator_thickness`][(c).],
415
+ and [`indicator`][(c).] properties.
417
416
  """
418
417
 
419
418
  indicator_animation: Optional[TabIndicatorAnimation] = None
@@ -421,12 +420,12 @@ class TabBar(LayoutControl, AdaptiveControl):
421
420
  Specifies the animation behavior of the tab indicator.
422
421
 
423
422
  If this is `None`, then the value of
424
- [`TabBarTheme.indicator_animation`][flet.TabBarTheme.indicator_animation] is used.
423
+ [`TabBarTheme.indicator_animation`][flet.] is used.
425
424
  If that is also `None`, then the tab indicator will animate linearly if the
426
- [`indicator_size`][flet.TabBar.indicator_size] is
427
- [`TabBarIndicatorSize.TAB`][flet.TabBarIndicatorSize.TAB], otherwise it will animate
428
- with an elastic effect if the [`indicator_size`][flet.TabBar.indicator_size] is
429
- [`TabBarIndicatorSize.LABEL`][flet.TabBarIndicatorSize.LABEL].
425
+ [`indicator_size`][(c).] is
426
+ [`TabBarIndicatorSize.TAB`][flet.], otherwise it will animate
427
+ with an elastic effect if the [`indicator_size`][(c).] is
428
+ [`TabBarIndicatorSize.LABEL`][flet.].
430
429
  """
431
430
 
432
431
  secondary: bool = False
@@ -465,7 +464,7 @@ class TabBar(LayoutControl, AdaptiveControl):
465
464
  overlay_color: Optional[ControlStateValue[ColorValue]] = None
466
465
  """
467
466
  Defines the ink response focus, hover, and splash
468
- colors in various [`ControlState`][flet.ControlState] states.
467
+ colors in various [`ControlState`][flet.] states.
469
468
 
470
469
  The following states are supported: `ControlState.PRESSED`,
471
470
  `ControlState.HOVERED` and
@@ -477,7 +476,7 @@ class TabBar(LayoutControl, AdaptiveControl):
477
476
  The height of the divider.
478
477
 
479
478
  If `None`, defaults to
480
- [`TabBarTheme.divider_height`][flet.TabBarTheme.divider_height]. If this is also
479
+ [`TabBarTheme.divider_height`][flet.]. If this is also
481
480
  `None`, `1.0` will be used.
482
481
  """
483
482
 
@@ -486,8 +485,8 @@ class TabBar(LayoutControl, AdaptiveControl):
486
485
  The thickness of the indicator. Value must be greater than zero.
487
486
 
488
487
  Note:
489
- Will be ignored if [`indicator`][flet.TabBar.indicator] or
490
- [`TabBarTheme.indicator`][flet.TabBarTheme.indicator] is not `None`.
488
+ Will be ignored if [`indicator`][(c).] or
489
+ [`TabBarTheme.indicator`][flet.] is not `None`.
491
490
  """
492
491
 
493
492
  enable_feedback: Optional[bool] = None
@@ -520,13 +519,13 @@ class TabBar(LayoutControl, AdaptiveControl):
520
519
  """
521
520
  Called when a tab is clicked.
522
521
 
523
- The [`data`][flet.Event.data] property of the event handler argument
522
+ The [`data`][flet.Event.] property of the event handler argument
524
523
  contains the index of the clicked tab.
525
524
  """
526
525
 
527
526
  on_hover: Optional[EventHandler[TabBarHoverEvent]] = None
528
527
  """
529
- Called when a tab's (from [`tabs`][flet.TabBar.tabs]) hover state in the
528
+ Called when a tab's (from [`tabs`][(c).]) hover state in the
530
529
  tab bar changes.
531
530
 
532
531
  When hover is moved from one tab directly to another, this will be called
@@ -558,7 +557,7 @@ class TabBar(LayoutControl, AdaptiveControl):
558
557
  @control("Tab")
559
558
  class Tab(AdaptiveControl):
560
559
  """
561
- A Material Design [`TabBar`][flet.TabBar] tab.
560
+ A Material Design [`TabBar`][flet.] tab.
562
561
 
563
562
  Raises:
564
563
  AssertionError: If both [`label`][(c).] and [`icon`][(c).] are not set.
@@ -579,7 +578,7 @@ class Tab(AdaptiveControl):
579
578
  The height of the tab.
580
579
 
581
580
  If `None`, it will be calculated based on the content of the Tab. When
582
- [`icon`][flet.Tab.icon] is not `None` along with [`label`][flet.Tab.label],
581
+ [`icon`][(c).] is not `None` along with [`label`][(c).],
583
582
  the default `height` is `72.0` pixels. Without an `icon`,
584
583
  the `height` is 46.0 pixels.
585
584
 
@@ -590,11 +589,11 @@ class Tab(AdaptiveControl):
590
589
  """
591
590
  The margin added around the tab's icon.
592
591
 
593
- Only useful when used in combination with [`icon`][flet.Tab.icon],
594
- and [`label`][flet.Tab.label] is not `None`.
592
+ Only useful when used in combination with [`icon`][(c).],
593
+ and [`label`][(c).] is not `None`.
595
594
 
596
595
  Defaults to `2` pixels of bottom margin.
597
- If [`Theme.use_material3`][flet.Theme.use_material3] is `False`,
596
+ If [`Theme.use_material3`][flet.] is `False`,
598
597
  then defaults to `10` pixels of bottom margin.
599
598
  """
600
599
 
@@ -56,7 +56,7 @@ class TextButton(LayoutControl, AdaptiveControl):
56
56
  """
57
57
  The URL to open when this button is clicked.
58
58
 
59
- Additionally, if [`on_click`][flet.TextButton.on_click] event callback is
59
+ Additionally, if [`on_click`][(c).] event callback is
60
60
  provided, it is fired after that.
61
61
  """
62
62
 
@@ -79,7 +79,7 @@ class TextButton(LayoutControl, AdaptiveControl):
79
79
  """
80
80
  Called when a mouse pointer enters or exists this button's response area.
81
81
 
82
- The [`data`][flet.Event.data] property of event object is `True` when cursor
82
+ The [`data`][flet.Event.] property of event object is `True` when cursor
83
83
  enters and `False` when it exits.
84
84
  """
85
85
 
@@ -19,11 +19,11 @@ from flet.controls.types import (
19
19
  )
20
20
 
21
21
  __all__ = [
22
- "TextField",
23
- "KeyboardType",
24
- "TextCapitalization",
25
22
  "InputFilter",
23
+ "KeyboardType",
26
24
  "NumbersOnlyInputFilter",
25
+ "TextCapitalization",
26
+ "TextField",
27
27
  "TextOnlyInputFilter",
28
28
  ]
29
29
 
@@ -142,9 +142,7 @@ class TextField(FormFieldControl, AdaptiveControl):
142
142
 
143
143
  keyboard_type: KeyboardType = KeyboardType.TEXT
144
144
  """
145
- The type of keyboard to use for editing the text. The property value is
146
- [`KeyboardType`][flet.KeyboardType] and defaults
147
- to `KeyboardType.TEXT`.
145
+ The type of keyboard to use for editing the text.
148
146
  """
149
147
 
150
148
  multiline: bool = False
@@ -64,7 +64,7 @@ class Tooltip:
64
64
  """
65
65
  The vertical gap between the control and the displayed tooltip.
66
66
 
67
- When [`prefer_below`][flet.Tooltip.prefer_below] is set to `True`
67
+ When [`prefer_below`][(c).] is set to `True`
68
68
  and tooltips have sufficient space to
69
69
  display themselves, this property defines how much vertical space
70
70
  tooltips will position themselves under their corresponding controls.
@@ -76,7 +76,7 @@ class Tooltip:
76
76
  """
77
77
  The empty space that surrounds the tooltip.
78
78
 
79
- If `None`, [`TooltipTheme.margin`][flet.TooltipTheme.margin] is used.
79
+ If `None`, [`TooltipTheme.margin`][flet.] is used.
80
80
  If that's is also `None`, defaults to `Margin.all(0.0)`.
81
81
  """
82
82
 
@@ -97,7 +97,7 @@ class Tooltip:
97
97
 
98
98
  text_style: Optional[TextStyle] = None
99
99
  """
100
- The [`TextStyle`][flet.TextStyle] to use for the
100
+ The [`TextStyle`][flet.] to use for the
101
101
  message of the tooltip.
102
102
  """
103
103
 
@@ -105,8 +105,8 @@ class Tooltip:
105
105
  """
106
106
  How the message of the tooltip is aligned horizontally.
107
107
 
108
- If `None`, [`TooltipTheme.text_align`][flet.TooltipTheme.text_align] is used.
109
- If that's is also `None`, defaults to [`TextAlign.START`][flet.TextAlign.START].
108
+ If `None`, [`TooltipTheme.text_align`][flet.] is used.
109
+ If that's is also `None`, defaults to [`TextAlign.START`][flet.].
110
110
  """
111
111
 
112
112
  prefer_below: Optional[bool] = None
@@ -116,18 +116,18 @@ class Tooltip:
116
116
  If there is insufficient space to display the tooltip in the preferred
117
117
  direction, the tooltip will be displayed in the opposite direction.
118
118
 
119
- If `None`, [`TooltipTheme.prefer_below`][flet.TooltipTheme.prefer_below] is used.
119
+ If `None`, [`TooltipTheme.prefer_below`][flet.] is used.
120
120
  If that's is also `None`, defaults to `True`.
121
121
  """
122
122
 
123
123
  show_duration: Optional[DurationValue] = None
124
124
  """
125
125
  The length of time that the tooltip will be shown after a long press is released
126
- (if triggerMode is [`TooltipTriggerMode.LONG_PRESS`][flet.TooltipTriggerMode.LONG_PRESS]) or a tap is released
127
- (if triggerMode is [`TooltipTriggerMode.TAP`][flet.TooltipTriggerMode.TAP]).
126
+ (if triggerMode is [`TooltipTriggerMode.LONG_PRESS`][flet.]) or a tap is released
127
+ (if triggerMode is [`TooltipTriggerMode.TAP`][flet.]).
128
128
  This property does not affect mouse pointer devices.
129
129
 
130
- If `None`, [`TooltipTheme.show_duration`][flet.TooltipTheme.show_duration] is used.
130
+ If `None`, [`TooltipTheme.show_duration`][flet.] is used.
131
131
  If that's is also `None`, defaults to `1.5` seconds for long press and tap released
132
132
  """
133
133
 
@@ -136,7 +136,7 @@ class Tooltip:
136
136
  The length of time, in milliseconds, that a pointer must hover over a
137
137
  tooltip's control before the tooltip will be shown.
138
138
 
139
- If `None`, [`TooltipTheme.wait_duration`][flet.TooltipTheme.wait_duration] is used.
139
+ If `None`, [`TooltipTheme.wait_duration`][flet.] is used.
140
140
  If that's is also `None`, defaults to `100` milliseconds.
141
141
  """
142
142
 
@@ -145,7 +145,7 @@ class Tooltip:
145
145
  The length of time that the tooltip will be shown after a
146
146
  long press is released or a tap is released or mouse pointer exits the control.
147
147
 
148
- If `None`, [`TooltipTheme.exit_duration`][flet.TooltipTheme.exit_duration] is used.
148
+ If `None`, [`TooltipTheme.exit_duration`][flet.] is used.
149
149
  If that's is also `None`, defaults to 0 milliseconds - no delay.
150
150
  """
151
151
 
@@ -163,9 +163,9 @@ class Tooltip:
163
163
  """
164
164
  The mode of the tooltip's trigger.
165
165
 
166
- If `None`, [`TooltipTheme.trigger_mode`][flet.TooltipTheme.trigger_mode] is used.
166
+ If `None`, [`TooltipTheme.trigger_mode`][flet.] is used.
167
167
  If that's is also `None`, defaults to
168
- [`TooltipTriggerMode.LONG_PRESS`][flet.TooltipTriggerMode.LONG_PRESS].
168
+ [`TooltipTriggerMode.LONG_PRESS`][flet.].
169
169
  """
170
170
 
171
171
  mouse_cursor: Optional[MouseCursor] = None
@@ -177,8 +177,9 @@ class Tooltip:
177
177
  """
178
178
  Defines the constraints on the size of this tooltip.
179
179
 
180
- If `None`, [`TooltipTheme.size_constraints`][flet.TooltipTheme.size_constraints] is used.
181
- If that's is also `None`, then a default value will be picked based on the current platform:
180
+ If `None`, [`TooltipTheme.size_constraints`][flet.] is used.
181
+ If that's is also `None`, then a default value will be picked
182
+ based on the current platform:
182
183
 
183
184
  - on desktop platforms: `BoxConstraints(min_height=24.0)`
184
185
  - on mobile platforms: `BoxConstraints(min_height=32.0)`
@@ -19,8 +19,8 @@ class VerticalDivider(Control):
19
19
  """
20
20
  The divider's width. The divider itself is always drawn as a vertical line
21
21
  that is centered within the width specified by this value.
22
-
23
- If `None`, [`DividerTheme.space`][flet.DividerTheme.space] is used.
22
+
23
+ If `None`, [`DividerTheme.space`][flet.] is used.
24
24
  If that's is also `None`, defaults to `16.0`.
25
25
  """
26
26
 
@@ -32,7 +32,7 @@ class VerticalDivider(Control):
32
32
  A divider with a thickness of `0.0` is always drawn as a line with a width of
33
33
  exactly one device pixel.
34
34
 
35
- If `None`, [`DividerTheme.thickness`][flet.DividerTheme.thickness] is used.
35
+ If `None`, [`DividerTheme.thickness`][flet.] is used.
36
36
  If that's is also `None`, defaults to `0.0`.
37
37
  """
38
38
 
@@ -40,24 +40,24 @@ class VerticalDivider(Control):
40
40
  """
41
41
  The color to use when painting the
42
42
  line.
43
-
44
- If `None`, [`DividerTheme.color`][flet.DividerTheme.color] is used.
45
- If that's is also `None`, defaults to [`Theme.divider_color`][flet.Theme.divider_color].
43
+
44
+ If `None`, [`DividerTheme.color`][flet.] is used.
45
+ If that's is also `None`, defaults to [`Theme.divider_color`][flet.].
46
46
  """
47
47
 
48
48
  leading_indent: Optional[Number] = None
49
49
  """
50
50
  The amount of empty space to the leading edge of the divider.
51
-
52
- If `None`, [`DividerTheme.leading_indent`][flet.DividerTheme.leading_indent] is used.
51
+
52
+ If `None`, [`DividerTheme.leading_indent`][flet.] is used.
53
53
  If that's is also `None`, defaults to `0.0`.
54
54
  """
55
55
 
56
56
  trailing_indent: Optional[Number] = None
57
57
  """
58
58
  The amount of empty space to the trailing edge of the divider.
59
-
60
- If `None`, [`DividerTheme.trailing_indent`][flet.DividerTheme.trailing_indent] is used.
59
+
60
+ If `None`, [`DividerTheme.trailing_indent`][flet.] is used.
61
61
  If that's is also `None`, defaults to `0.0`.
62
62
  """
63
63
 
flet/controls/page.py CHANGED
@@ -167,7 +167,7 @@ class MultiViewRemoveEvent(Event["Page"]):
167
167
  @control("Page", isolated=True, post_init_args=2)
168
168
  class Page(BasePage):
169
169
  """
170
- Page is a container for [`View`][flet.View] controls.
170
+ Page is a container for [`View`][flet.] controls.
171
171
 
172
172
  A page instance and the root view are automatically created when a new
173
173
  user session started.
@@ -343,7 +343,7 @@ class Page(BasePage):
343
343
  on_view_pop: Optional[EventHandler[ViewPopEvent]] = None
344
344
  """
345
345
  Called when the user clicks automatic "Back" button in
346
- [`AppBar`][flet.AppBar] control.
346
+ [`AppBar`][flet.] control.
347
347
  """
348
348
 
349
349
  on_keyboard_event: Optional[EventHandler[KeyboardEvent]] = None
@@ -695,8 +695,8 @@ class Page(BasePage):
695
695
  Args:
696
696
  url: The URL to open.
697
697
  web_popup_window_name: Window tab/name to open URL in. Use
698
- [`UrlTarget.SELF`][flet.UrlTarget.SELF]
699
- for the same browser tab, [`UrlTarget.BLANK`][flet.UrlTarget.BLANK]
698
+ [`UrlTarget.SELF`][flet.]
699
+ for the same browser tab, [`UrlTarget.BLANK`][flet.]
700
700
  for a new browser tab (or in external application on mobile device),
701
701
  or a custom name for a named tab.
702
702
  web_popup_window: Display the URL in a browser popup window.
flet/controls/painting.py CHANGED
@@ -59,7 +59,7 @@ class PaintLinearGradient(PaintGradient):
59
59
  the stops. This list must contain at least two colors.
60
60
 
61
61
  Note:
62
- If [`color_stops`][flet.PaintLinearGradient.color_stops] is not `None`,
62
+ If [`color_stops`][(c).] is not `None`,
63
63
  this list must have the same length as `color_stops`.
64
64
  """
65
65
 
@@ -69,7 +69,7 @@ class PaintLinearGradient(PaintGradient):
69
69
 
70
70
  Note:
71
71
  If non-none, this list must have the same length as
72
- [`colors`][flet.PaintLinearGradient.colors].
72
+ [`colors`][(c).].
73
73
  If the first value is not `0.0`, then a stop with position `0.0` and a color
74
74
  equal to the first color in `colors` is implied. If the last value is not
75
75
  `1.0`, then a stop with position `1.0` and a color equal to the last color
@@ -141,7 +141,7 @@ class ScrollableControl(Control):
141
141
  no animation.
142
142
 
143
143
  `curve` configures animation curve. Property value is
144
- [`AnimationCurve`][flet.AnimationCurve]
144
+ [`AnimationCurve`][flet.]
145
145
  enum.
146
146
 
147
147
  Defaults to `AnimationCurve.EASE`.
@@ -19,7 +19,7 @@ __all__ = [
19
19
  class FilePickerFileType(Enum):
20
20
  """
21
21
  Defines the file types that can be selected using the
22
- [`FilePicker`][flet.FilePicker].
22
+ [`FilePicker`][flet.].
23
23
  """
24
24
 
25
25
  ANY = "any"
@@ -29,8 +29,8 @@ class FilePickerFileType(Enum):
29
29
 
30
30
  MEDIA = "media"
31
31
  """
32
- A combination of [`VIDEO`][flet.FilePickerFileType.VIDEO] and
33
- [`IMAGE`][flet.FilePickerFileType.IMAGE].
32
+ A combination of [`VIDEO`][(c).] and
33
+ [`IMAGE`][(c).].
34
34
  """
35
35
 
36
36
  IMAGE = "image"
@@ -133,11 +133,11 @@ class FilePicker(Service):
133
133
  Uploads selected files to specified upload URLs.
134
134
 
135
135
  Before calling this method,
136
- [`pick_files()`][flet.FilePicker.pick_files]
136
+ [`pick_files()`][(c).pick_files]
137
137
  must be called, so that the internal file picker selection is not empty.
138
138
 
139
139
  Args:
140
- files: A list of [`FilePickerUploadFile`][flet.FilePickerUploadFile], where
140
+ files: A list of [`FilePickerUploadFile`][flet.], where
141
141
  each item specifies which file to upload, and where
142
142
  (with PUT or POST).
143
143
  """
@@ -202,7 +202,7 @@ class FilePicker(Service):
202
202
  iOS or Android modes.
203
203
  allowed_extensions: The allowed file extensions. Has effect only if
204
204
  `file_type` is
205
- [`FilePickerFileType.CUSTOM`][flet.FilePickerFileType.CUSTOM].
205
+ [`FilePickerFileType.CUSTOM`][flet.].
206
206
 
207
207
  Raises:
208
208
  ValueError: If `src_bytes` is not provided, when called in web mode,
@@ -249,7 +249,7 @@ class FilePicker(Service):
249
249
  allow_multiple: Allow the selection of multiple files at once.
250
250
  allowed_extensions: The allowed file extensions. Has effect only if
251
251
  `file_type` is
252
- [`FilePickerFileType.CUSTOM`][flet.FilePickerFileType.CUSTOM].
252
+ [`FilePickerFileType.CUSTOM`][flet.].
253
253
  """
254
254
  files = await self._invoke_method(
255
255
  "pick_files",