flet 0.70.0.dev5623__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 +13 -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 +25 -23
  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 +611 -609
  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.dev5623.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.dev5623.dist-info/RECORD +0 -238
  122. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5771.dist-info}/WHEEL +0 -0
  123. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5771.dist-info}/entry_points.txt +0 -0
  124. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5771.dist-info}/top_level.txt +0 -0
@@ -29,7 +29,7 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
29
29
 
30
30
  horizontal: bool = False
31
31
  """
32
- Whether to layout the [`controls`][flet.ListView.controls] horizontally.
32
+ Whether to layout the [`controls`][(c).] horizontally.
33
33
  """
34
34
 
35
35
  reverse: bool = False
@@ -37,7 +37,7 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
37
37
  Whether the scroll view scrolls in the reading direction.
38
38
 
39
39
  For example, if the reading direction is left-to-right and
40
- [`horizontal`][flet.ListView.horizontal] is `True`,
40
+ [`horizontal`][(c).] is `True`,
41
41
  then the scroll view scrolls from left to right when `reverse` is `False`
42
42
  and from right to left when `reverse` is `True`.
43
43
 
@@ -47,18 +47,18 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
47
47
 
48
48
  spacing: Number = 0
49
49
  """
50
- The height of divider between the [`controls`][flet.ListView.controls].
50
+ The height of divider between the [`controls`][(c).].
51
51
  """
52
52
 
53
53
  item_extent: Optional[Number] = None
54
54
  """
55
- A fixed height or width (when [`horizontal`][flet.ListView.horizontal] is `True`)
55
+ A fixed height or width (when [`horizontal`][(c).] is `True`)
56
56
  of an item to optimize rendering.
57
57
  """
58
58
 
59
59
  first_item_prototype: bool = False
60
60
  """
61
- Whether the dimensions of the first item of [`controls`][flet.ListView.controls]
61
+ Whether the dimensions of the first item of [`controls`][(c).]
62
62
  should be used as a "prototype" for all other items,
63
63
  i.e. their `height` or `width` will be the same as the first item.
64
64
  """
@@ -75,7 +75,7 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
75
75
 
76
76
  clip_behavior: ClipBehavior = ClipBehavior.HARD_EDGE
77
77
  """
78
- How to clip the [`controls`][flet.ListView.controls]
78
+ How to clip the [`controls`][(c).]
79
79
  """
80
80
 
81
81
  semantic_child_count: Optional[int] = None
@@ -98,7 +98,7 @@ class ListView(LayoutControl, ScrollableControl, AdaptiveControl):
98
98
 
99
99
  build_controls_on_demand: bool = True
100
100
  """
101
- Whether the [`controls`][flet.ListView.controls] should be built lazily/on-demand.
101
+ Whether the [`controls`][(c).] should be built lazily/on-demand.
102
102
 
103
103
  This is particularly useful when dealing with a large number of controls.
104
104
  """
@@ -317,7 +317,7 @@ class Markdown(LayoutControl):
317
317
  """
318
318
  Called when a link within Markdown document is clicked/tapped.
319
319
 
320
- The [`data`][flet.Event.data] property of the event handler argument
320
+ The [`data`][flet.Event.] property of the event handler argument
321
321
  contains the clickedURL.
322
322
 
323
323
  Example:
@@ -22,7 +22,7 @@ class Pagelet(LayoutControl, AdaptiveControl):
22
22
  Implements the basic Material Design visual layout structure.
23
23
 
24
24
  Use it for projects that require a "page within a page" layouts with its own
25
- [`AppBar`][flet..], [`BottomAppBar`][flet..], [`NavigationDrawer`][flet..],
25
+ [`AppBar`][flet.], [`BottomAppBar`][flet.], [`NavigationDrawer`][flet.],
26
26
  such as demos and galleries.
27
27
 
28
28
  Raises:
@@ -39,29 +39,29 @@ class Pagelet(LayoutControl, AdaptiveControl):
39
39
 
40
40
  appbar: Optional[Union[AppBar, CupertinoAppBar]] = None
41
41
  """
42
- An [`AppBar`][flet.AppBar] control to display at the top
42
+ An [`AppBar`][flet.] control to display at the top
43
43
  of the Pagelet.
44
44
  """
45
45
 
46
46
  navigation_bar: Optional[Union[NavigationBar, CupertinoNavigationBar]] = None
47
47
  """
48
- A navigation bar ([`NavigationBar`][flet.NavigationBar] or
49
- [`CupertinoNavigationBar`][flet.CupertinoNavigationBar]) control to display
48
+ A navigation bar ([`NavigationBar`][flet.] or
49
+ [`CupertinoNavigationBar`][flet.]) control to display
50
50
  at the bottom of the `Pagelet`.
51
51
 
52
52
  Note:
53
- If both the `navigation_bar` and [`bottom_appbar`][flet.Pagelet.bottom_appbar]
53
+ If both the `navigation_bar` and [`bottom_appbar`][(c).]
54
54
  properties are specified, `navigation_bar` takes precedence and will
55
55
  be displayed.
56
56
  """
57
57
 
58
58
  bottom_appbar: Optional[BottomAppBar] = None
59
59
  """
60
- A [`BottomAppBar`][flet.BottomAppBar] control to display at
60
+ A [`BottomAppBar`][flet.] control to display at
61
61
  the bottom of the `Pagelet`.
62
62
 
63
63
  Note:
64
- If both the `bottom_appbar` and [`navigation_bar`][flet.Pagelet.navigation_bar]
64
+ If both the `bottom_appbar` and [`navigation_bar`][(c).]
65
65
  properties are specified, `bottom_appbar` takes precedence and will
66
66
  be displayed.
67
67
  """
@@ -74,19 +74,19 @@ class Pagelet(LayoutControl, AdaptiveControl):
74
74
 
75
75
  drawer: Optional[NavigationDrawer] = None
76
76
  """
77
- A [`NavigationDrawer`][flet.NavigationDrawer] control to
77
+ A [`NavigationDrawer`][flet.] control to
78
78
  display as a panel sliding from the start edge of the page.
79
79
  """
80
80
 
81
81
  end_drawer: Optional[NavigationDrawer] = None
82
82
  """
83
- A [`NavigationDrawer`][flet.NavigationDrawer] control to
83
+ A [`NavigationDrawer`][flet.] control to
84
84
  display as a panel sliding from the end edge of the page.
85
85
  """
86
86
 
87
87
  floating_action_button: Optional[Control] = None
88
88
  """
89
- A [`FloatingActionButton`][flet.FloatingActionButton]
89
+ A [`FloatingActionButton`][flet.]
90
90
  control to display on top of Pagelet content.
91
91
  """
92
92
 
@@ -7,7 +7,7 @@ from flet.controls.layout_control import LayoutControl
7
7
  @control("ReorderableDraggable")
8
8
  class ReorderableDraggable(LayoutControl, AdaptiveControl):
9
9
  """
10
- Used to drag an item in a [`ReorderableListView`][flet.ReorderableListView].
10
+ Used to drag an item in a [`ReorderableListView`][flet.].
11
11
 
12
12
  It creates a listener for a drag immediately following a pointer down
13
13
  event over the given [`content`][(c).] control.
@@ -24,7 +24,7 @@ class ResponsiveRow(LayoutControl, AdaptiveControl):
24
24
  By default, a virtual grid has 12 columns, but that can be customized with
25
25
  [`columns`][(c).] property.
26
26
 
27
- Similar to `expand` property, every control has [`col`][flet.Control.col]
27
+ Similar to `expand` property, every control has [`col`][flet.Control.]
28
28
  property which allows specifying how many columns a control should span.
29
29
  """
30
30
 
@@ -40,13 +40,13 @@ class ResponsiveRow(LayoutControl, AdaptiveControl):
40
40
 
41
41
  alignment: MainAxisAlignment = MainAxisAlignment.START
42
42
  """
43
- Defines how the child [`controls`][flet.ResponsiveRow.controls] should be
43
+ Defines how the child [`controls`][(c).] should be
44
44
  placed horizontally.
45
45
  """
46
46
 
47
47
  vertical_alignment: CrossAxisAlignment = CrossAxisAlignment.START
48
48
  """
49
- Defines how the child [`controls`][flet.ResponsiveRow.controls] should be placed
49
+ Defines how the child [`controls`][(c).] should be placed
50
50
  vertically.
51
51
  """
52
52
 
@@ -55,10 +55,10 @@ class ResponsiveRow(LayoutControl, AdaptiveControl):
55
55
  The spacing between controls in a row in virtual pixels.
56
56
 
57
57
  Note:
58
- Has effect only when [`alignment`][flet.ResponsiveRow.alignment] is set to
59
- [`MainAxisAlignment.START`][flet.MainAxisAlignment.START],
60
- [`MainAxisAlignment.END`][flet.MainAxisAlignment.END],
61
- or [`MainAxisAlignment.CENTER`][flet.MainAxisAlignment.CENTER].
58
+ Has effect only when [`alignment`][(c).] is set to
59
+ [`MainAxisAlignment.START`][flet.],
60
+ [`MainAxisAlignment.END`][flet.],
61
+ or [`MainAxisAlignment.CENTER`][flet.].
62
62
  """
63
63
 
64
64
  run_spacing: ResponsiveNumber = 10
flet/controls/core/row.py CHANGED
@@ -16,7 +16,7 @@ class Row(LayoutControl, ScrollableControl, AdaptiveControl):
16
16
  Displays its children in a horizontal array.
17
17
 
18
18
  To cause a child control to expand and fill the available horizontal space, set
19
- its [`expand`][flet.Control.expand] property.
19
+ its [`expand`][(c).] property.
20
20
  """
21
21
 
22
22
  controls: list[Control] = field(default_factory=list)
@@ -26,23 +26,23 @@ class Row(LayoutControl, ScrollableControl, AdaptiveControl):
26
26
 
27
27
  alignment: MainAxisAlignment = MainAxisAlignment.START
28
28
  """
29
- Defines how the child [`controls`][flet.Row.controls] should be placed horizontally.
29
+ Defines how the child [`controls`][(c).] should be placed horizontally.
30
30
  """
31
31
 
32
32
  vertical_alignment: CrossAxisAlignment = CrossAxisAlignment.CENTER
33
33
  """
34
- Defines how the child [`controls`][flet.Row.controls] should be placed vertically.
34
+ Defines how the child [`controls`][(c).] should be placed vertically.
35
35
  """
36
36
 
37
37
  spacing: Number = 10
38
38
  """
39
- The spacing between the child [`controls`][flet.Row.controls].
39
+ The spacing between the child [`controls`][(c).].
40
40
 
41
41
  Note:
42
- Has effect only when [`alignment`][flet.ResponsiveRow.alignment] is set to
43
- [`MainAxisAlignment.START`][flet.MainAxisAlignment.START],
44
- [`MainAxisAlignment.END`][flet.MainAxisAlignment.END],
45
- or [`MainAxisAlignment.CENTER`][flet.MainAxisAlignment.CENTER].
42
+ Has effect only when [`alignment`][(c).] is set to
43
+ [`MainAxisAlignment.START`][flet.],
44
+ [`MainAxisAlignment.END`][flet.],
45
+ or [`MainAxisAlignment.CENTER`][flet.].
46
46
  """
47
47
 
48
48
  tight: bool = False
@@ -12,10 +12,12 @@ __all__ = ["Semantics"]
12
12
  @control("Semantics")
13
13
  class Semantics(Control):
14
14
  """
15
- Provides semantic annotations for the control tree, describing the meaning and purpose of controls.
15
+ Provides semantic annotations for the control tree, describing the meaning
16
+ and purpose of controls.
16
17
 
17
- These annotations are utilized by accessibility tools, search engines, and semantic analysis software
18
- to better understand the structure and functionality of the application.
18
+ These annotations are utilized by accessibility tools, search engines,
19
+ and semantic analysis software to better understand the structure and
20
+ functionality of the application.
19
21
  """
20
22
 
21
23
  content: Optional[Control] = None
@@ -25,7 +27,7 @@ class Semantics(Control):
25
27
 
26
28
  label: Optional[str] = None
27
29
  """
28
- A textual description of the [`content`][flet.Semantics.content].
30
+ A textual description of the [`content`][(c).].
29
31
  """
30
32
 
31
33
  expanded: Optional[bool] = None
@@ -52,12 +54,13 @@ class Semantics(Control):
52
54
 
53
55
  obscured: Optional[bool] = None
54
56
  """
55
- Whether [`value`][flet.Semantics.value] should be obscured.
57
+ Whether [`value`][(c).] should be obscured.
56
58
  """
57
59
 
58
60
  multiline: Optional[bool] = None
59
61
  """
60
- Whether the [`value`][flet.Semantics.value] is coming from a field that supports multiline text editing.
62
+ Whether the [`value`][(c).] is coming from a field that supports multiline
63
+ text editing.
61
64
  """
62
65
 
63
66
  focusable: Optional[bool] = None
@@ -16,7 +16,7 @@ class ShaderMask(LayoutControl):
16
16
  Applies a mask generated by a shader to its [`content`][(c).].
17
17
 
18
18
  For example, it can be used to gradually fade out the edge of a control by
19
- using a [`LinearGradient`][flet.LinearGradient] mask.
19
+ using a [`LinearGradient`][flet.] mask.
20
20
  """
21
21
 
22
22
  shader: Gradient
@@ -26,13 +26,13 @@ class ShaderMask(LayoutControl):
26
26
 
27
27
  content: Optional[Control] = None
28
28
  """
29
- The Control to which the [`shader`][flet.ShaderMask.shader] is applied.
29
+ The Control to which the [`shader`][(c).] is applied.
30
30
  """
31
31
 
32
32
  blend_mode: BlendMode = BlendMode.MODULATE
33
33
  """
34
34
  The blend mode to use when applying the shader to the
35
- [`content`][flet.ShaderMask.content].
35
+ [`content`][(c).].
36
36
  """
37
37
 
38
38
  border_radius: Optional[BorderRadiusValue] = None
@@ -49,14 +49,14 @@ class Stack(LayoutControl, AdaptiveControl):
49
49
  alignment: Optional[Alignment] = None
50
50
  """
51
51
  Specifies the alignment for non-positioned (those without explicit
52
- alignment properties such as [`top`][flet.LayoutControl.top]
53
- or [`bottom`][flet.LayoutControl.bottom]) and
54
- partially-positioned [`controls`][flet.Stack.controls].
52
+ alignment properties such as [`top`][flet.LayoutControl.]
53
+ or [`bottom`][flet.LayoutControl.]) and
54
+ partially-positioned [`controls`][(c).].
55
55
  """
56
56
 
57
57
  fit: StackFit = StackFit.LOOSE
58
58
  """
59
- How to size the non-positioned [`controls`][flet.Stack.controls].
59
+ How to size the non-positioned [`controls`][(c).].
60
60
  """
61
61
 
62
62
  def init(self):
@@ -177,7 +177,7 @@ class Text(LayoutControl):
177
177
  Display text.
178
178
 
179
179
  It consists of two sources combined to produce the final text:
180
- [`value`][(c).] and [`spans`][(c)].
180
+ [`value`][(c).] and [`spans`][(c).].
181
181
  """
182
182
 
183
183
  value: str = ""
@@ -187,7 +187,7 @@ class Text(LayoutControl):
187
187
 
188
188
  spans: Optional[list[TextSpan]] = None
189
189
  """
190
- The list of [`TextSpan`][flet.TextSpan]
190
+ The list of [`TextSpan`][flet.]
191
191
  objects to build a rich text paragraph.
192
192
  """
193
193
 
@@ -297,7 +297,7 @@ class Text(LayoutControl):
297
297
  Whether to show cursor (blinking caret) when the text is selected.
298
298
 
299
299
  Note:
300
- Has effect only when [`selectable`][flet.Text.selectable] is `True`.
300
+ Has effect only when [`selectable`][(c).] is `True`.
301
301
  """
302
302
 
303
303
  enable_interactive_selection: bool = True
@@ -310,7 +310,7 @@ class Text(LayoutControl):
310
310
  the user, text cannot be copied.
311
311
 
312
312
  Note:
313
- Has effect only when [`selectable`][flet.Text.selectable] is `True`.
313
+ Has effect only when [`selectable`][(c).] is `True`.
314
314
  """
315
315
 
316
316
  selection_cursor_width: Number = 2.0
@@ -324,7 +324,7 @@ class Text(LayoutControl):
324
324
  Negative values may be used to reverse this behavior.
325
325
 
326
326
  Note:
327
- Has effect only when [`selectable`][flet.Text.selectable] is `True`.
327
+ Has effect only when [`selectable`][(c).] is `True`.
328
328
  """
329
329
 
330
330
  selection_cursor_height: Optional[Number] = None
@@ -344,7 +344,7 @@ class Text(LayoutControl):
344
344
  Called when the user taps on this selectable text.
345
345
 
346
346
  Note:
347
- Has effect only when [`selectable`][flet.Text.selectable] is `True`.
347
+ Has effect only when [`selectable`][(c).] is `True`.
348
348
  """
349
349
 
350
350
  on_selection_change: Optional[EventHandler[TextSelectionChangeEvent["Text"]]] = None
@@ -352,5 +352,5 @@ class Text(LayoutControl):
352
352
  Called when the user changes the selection of text (including the cursor location).
353
353
 
354
354
  Note:
355
- Has effect only when [`selectable`][flet.Text.selectable] is `True`.
355
+ Has effect only when [`selectable`][(c).] is `True`.
356
356
  """
@@ -14,7 +14,7 @@ class TextSpan(Control):
14
14
  """
15
15
  A text span.
16
16
 
17
- Usage Example: As a child of [`Text.spans`][flet.Text.spans].
17
+ Usage Example: As a child of [`Text.spans`][flet.].
18
18
 
19
19
  For the object to be useful, at least one of [`text`][(c).] or
20
20
  [`spans`][(c).] should be set.
@@ -25,7 +25,7 @@ class TextSpan(Control):
25
25
  The text contained in this span.
26
26
 
27
27
  Note:
28
- If both `text` and [`spans`][flet.TextSpan.spans] are defined,
28
+ If both `text` and [`spans`][(c).] are defined,
29
29
  the `text` takes precedence.
30
30
  """
31
31
 
@@ -39,7 +39,7 @@ class TextSpan(Control):
39
39
  Additional spans to include as children.
40
40
 
41
41
  Note:
42
- If both `spans` and [`text`][flet.TextSpan.text] are defined,
42
+ If both `spans` and [`text`][(c).] are defined,
43
43
  the `text` takes precedence.
44
44
  """
45
45
 
@@ -47,7 +47,7 @@ class TextSpan(Control):
47
47
  """
48
48
  The URL to open when this button is clicked.
49
49
 
50
- Additionally, if [`on_click`][flet.TextSpan.on_click] event callback is provided,
50
+ Additionally, if [`on_click`][(c).] event callback is provided,
51
51
  it is fired after that.
52
52
  """
53
53
 
@@ -14,9 +14,9 @@ class TransparentPointer(LayoutControl):
14
14
  two widgets in Stack"](https://stackoverflow.com/questions/65269190/pass-trough-all-
15
15
  gestures-between-two-widgets-in-stack) problem.
16
16
 
17
- For example, if there is an [`Button`][flet.Button]
18
- inside [`Container`][flet.Container] with
19
- [`GestureDetector`][flet.GestureDetector] then tapping on
17
+ For example, if there is an [`Button`][flet.]
18
+ inside [`Container`][flet.] with
19
+ [`GestureDetector`][flet.] then tapping on
20
20
  a button won't be "visible" to a gesture detector behind it. With
21
21
  `TransparentPointer` a tapping event doesn't stop on a button, but goes up to the
22
22
  parent, similar to event bubbling in HTML/JS.
@@ -33,14 +33,14 @@ class View(ScrollableControl, LayoutControl):
33
33
  View is the top most container for all other controls.
34
34
 
35
35
  A root view is automatically created when a new user session started. From layout
36
- perspective the View represents a [`Column`][flet.Column]
36
+ perspective the View represents a [`Column`][flet.]
37
37
  control, so it has a similar behavior and shares same properties.
38
38
  """
39
39
 
40
40
  route: Optional[str] = None
41
41
  """
42
42
  View's route - not currently used by Flet framework, but can be used in a user
43
- program to update [`Page.route`][flet.Page.route] when a view popped.
43
+ program to update [`Page.route`][flet.] when a view popped.
44
44
  """
45
45
 
46
46
  controls: list[BaseControl] = field(default_factory=list)
@@ -73,19 +73,19 @@ class View(ScrollableControl, LayoutControl):
73
73
 
74
74
  appbar: Optional[Union[AppBar, CupertinoAppBar]] = None
75
75
  """
76
- An [`AppBar`][flet.AppBar] control to display at the top of
76
+ An [`AppBar`][flet.] control to display at the top of
77
77
  the `Page`.
78
78
  """
79
79
 
80
80
  bottom_appbar: Optional[BottomAppBar] = None
81
81
  """
82
- A [`BottomAppBar`][flet.BottomAppBar] control to display at the bottom of
82
+ A [`BottomAppBar`][flet.] control to display at the bottom of
83
83
  the `Page`.
84
84
  """
85
85
 
86
86
  floating_action_button: Optional[FloatingActionButton] = None
87
87
  """
88
- A [`FloatingActionButton`][flet.FloatingActionButton] control to display on top
88
+ A [`FloatingActionButton`][flet.] control to display on top
89
89
  of `Page` content.
90
90
  """
91
91
 
@@ -93,31 +93,31 @@ class View(ScrollableControl, LayoutControl):
93
93
  Union[FloatingActionButtonLocation, OffsetValue]
94
94
  ] = None
95
95
  """
96
- Describes position of [`floating_action_button`][flet.View.floating_action_button]
96
+ Describes position of [`floating_action_button`][(c).]
97
97
  """
98
98
 
99
99
  navigation_bar: Union[NavigationBar, CupertinoNavigationBar, None] = None
100
100
  """
101
- A navigation bar ([`NavigationBar`][flet.NavigationBar] or
102
- [`CupertinoNavigationBar`][flet.CupertinoNavigationBar]) control to display
101
+ A navigation bar ([`NavigationBar`][flet.] or
102
+ [`CupertinoNavigationBar`][flet.]) control to display
103
103
  at the bottom of the `Page`.
104
104
  """
105
105
 
106
106
  drawer: Optional[NavigationDrawer] = None
107
107
  """
108
- A [`NavigationDrawer`][flet.NavigationDrawer] control to
108
+ A [`NavigationDrawer`][flet.] control to
109
109
  display as a panel sliding from the start edge of the view.
110
110
  """
111
111
 
112
112
  end_drawer: Optional[NavigationDrawer] = None
113
113
  """
114
- A [`NavigationDrawer`][flet.NavigationDrawer] control to
114
+ A [`NavigationDrawer`][flet.] control to
115
115
  display as a panel sliding from the end edge of the view.
116
116
  """
117
117
 
118
118
  vertical_alignment: MainAxisAlignment = MainAxisAlignment.START
119
119
  """
120
- Defines how the child [`controls`][flet.View.controls] should be placed vertically.
120
+ Defines how the child [`controls`][(c).] should be placed vertically.
121
121
  """
122
122
 
123
123
  horizontal_alignment: CrossAxisAlignment = CrossAxisAlignment.START
@@ -127,14 +127,14 @@ class View(ScrollableControl, LayoutControl):
127
127
 
128
128
  spacing: Number = 10
129
129
  """
130
- The vertical spacing between [`controls`][flet.View.controls] on the `Page`.
130
+ The vertical spacing between [`controls`][(c).] on the `Page`.
131
131
 
132
132
  Note:
133
- Has effect only when [`vertical_alignment`][flet.View.vertical_alignment]
133
+ Has effect only when [`vertical_alignment`][(c).]
134
134
  is set to
135
- [`MainAxisAlignment.START`][flet.MainAxisAlignment.START],
136
- [`MainAxisAlignment.END`][flet.MainAxisAlignment.END],
137
- or [`MainAxisAlignment.CENTER`][flet.MainAxisAlignment.CENTER].
135
+ [`MainAxisAlignment.START`][flet.],
136
+ [`MainAxisAlignment.END`][flet.],
137
+ or [`MainAxisAlignment.CENTER`][flet.].
138
138
  """
139
139
 
140
140
  padding: Optional[PaddingValue] = field(default_factory=lambda: Padding.all(10))
@@ -63,7 +63,7 @@ class Window(BaseControl):
63
63
  Sets background color of an application window.
64
64
 
65
65
  Tip:
66
- Can be used together with [`Page.bgcolor`][flet.Page.bgcolor] to make
66
+ Can be used together with [`Page.bgcolor`][flet.] to make
67
67
  a window transparent.
68
68
  """
69
69
 
@@ -36,7 +36,7 @@ class WindowDragArea(LayoutControl):
36
36
  Called when the `WindowDragArea` is double-tapped and `maximizable=True`.
37
37
 
38
38
  Info:
39
- When a double-tap event is fired, the [`type`][flet.WindowEvent.type]
39
+ When a double-tap event is fired, the [`type`][flet.WindowEvent.]
40
40
  property of the event handler argument can only be one of the following:
41
41
  `WindowEventType.MAXIMIZE`, `WindowEventType.UNMAXIMIZE`.
42
42
  """
@@ -12,13 +12,16 @@ __all__ = ["CupertinoActionSheet"]
12
12
  class CupertinoActionSheet(LayoutControl):
13
13
  """
14
14
  An iOS-style action sheet.
15
+
16
+ Action sheets are generally used to give the user a choice between
17
+ two or more choices for the current context.
15
18
  """
16
19
 
17
20
  title: Optional[StrOrControl] = None
18
21
  """
19
22
  A control containing the title of the action sheet.
20
23
 
21
- Typically a [`Text`][flet.Text] control.
24
+ Typically a [`Text`][flet.] control.
22
25
  """
23
26
 
24
27
  message: Optional[StrOrControl] = None
@@ -26,23 +29,31 @@ class CupertinoActionSheet(LayoutControl):
26
29
  A control containing a descriptive message that provides more details about the
27
30
  reason for the alert.
28
31
 
29
- Typically a [`Text`][flet.Text] control.
32
+ Typically a [`Text`][flet.] control.
30
33
  """
31
34
 
32
35
  actions: Optional[list[Control]] = None
33
36
  """
34
37
  A list of action buttons to be shown in the sheet.
35
38
 
36
- These actions are typically
37
- [`CupertinoActionSheetAction`][flet.CupertinoActionSheetAction]s.
38
-
39
- This list must have at least one action.
39
+ These actions are typically [`CupertinoActionSheetAction`][flet.]s.
40
40
  """
41
41
 
42
42
  cancel: Optional[Control] = None
43
43
  """
44
44
  An optional control to be shown below the actions but grouped separately from them.
45
45
 
46
- Typically a [`CupertinoActionSheetAction`][flet.CupertinoActionSheetAction]
47
- button.
46
+ Typically a [`CupertinoActionSheetAction`][flet.] button.
48
47
  """
48
+
49
+ def before_update(self):
50
+ super().before_update()
51
+ assert (
52
+ self.actions is not None
53
+ or self.title is not None
54
+ or self.message is not None
55
+ or self.cancel is not None
56
+ ), (
57
+ "This action sheet must have a non-None value for at least one of the "
58
+ "following arguments: `actions`, `title`, `message`, or `cancel`"
59
+ )
@@ -13,26 +13,25 @@ class CupertinoActivityIndicator(LayoutControl):
13
13
  An iOS-style activity indicator that spins clockwise.
14
14
 
15
15
  Raises:
16
- ValueError: If `radius` is not strictly greater than 0.
16
+ ValueError: If [`radius`][(c).] is not strictly greater than `0`.
17
17
  """
18
18
 
19
19
  radius: Number = 10
20
20
  """
21
- The radius of the activity indicator.
21
+ The radius of this indicator.
22
22
 
23
23
  Note:
24
- Must be strictly greater than 0.
24
+ Must be strictly greater than `0`.
25
25
  """
26
26
 
27
27
  color: Optional[ColorValue] = None
28
28
  """
29
- Defines the color of the activity
30
- indicator.
29
+ Defines the color of this indicator.
31
30
  """
32
31
 
33
32
  animating: bool = True
34
33
  """
35
- Whether the activity indicator is running its animation.
34
+ Whether this indicator is running its animation.
36
35
  """
37
36
 
38
37
  def before_update(self):
@@ -28,27 +28,24 @@ class CupertinoAlertDialog(DialogControl):
28
28
 
29
29
  title: Optional[StrOrControl] = None
30
30
  """
31
- The (optional) title of the dialog is displayed in a large font at the top of the
32
- dialog.
31
+ The title of this dialog, displayed in a large font at the top of this dialog.
33
32
 
34
- Typically a [`Text`][flet.Text] control.
33
+ Typically a [`Text`][flet.] control.
35
34
  """
36
35
 
37
36
  content: Optional[Control] = None
38
37
  """
39
- The (optional) content of the dialog is displayed in the center of the dialog in a
40
- lighter font.
38
+ The content of this dialog, displayed in a light font at the center of this dialog.
41
39
 
42
- Typically this is a [`Column`][flet.Column] that contains
43
- the dialog's [`Text`][flet.Text] message.
40
+ Typically a [`Column`][flet.] that contains
41
+ the dialog's [`Text`][flet.] message.
44
42
  """
45
43
 
46
44
  actions: list[Control] = field(default_factory=list)
47
45
  """
48
- The (optional) set of actions that are displayed at the bottom of the dialog.
46
+ A set of actions that are displayed at the bottom of the dialog.
49
47
 
50
- Typically this is a list of
51
- [`CupertinoDialogAction`][flet.CupertinoDialogAction] controls.
48
+ Typically this is a list of [`CupertinoDialogAction`][flet.] controls.
52
49
  """
53
50
 
54
51
  inset_animation: Animation = field(