flet 0.70.0.dev5623__py3-none-any.whl → 0.70.0.dev5774__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 (125) 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/finder.py +2 -0
  118. flet/testing/flet_test_app.py +6 -4
  119. flet/version.py +1 -1
  120. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/METADATA +5 -5
  121. flet-0.70.0.dev5774.dist-info/RECORD +239 -0
  122. flet-0.70.0.dev5623.dist-info/RECORD +0 -238
  123. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/WHEEL +0 -0
  124. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/entry_points.txt +0 -0
  125. {flet-0.70.0.dev5623.dist-info → flet-0.70.0.dev5774.dist-info}/top_level.txt +0 -0
@@ -15,19 +15,19 @@ class CupertinoAppBar(Control):
15
15
  An iOS-styled app bar.
16
16
 
17
17
  Note:
18
- The alignment of the [`title`][(c).] depends on whether this app bar is [`large`][(c).] or not.
19
- If it is `True`, the `title` is left-aligned and if it is `False` (the default),
20
- the `title` is centered.
18
+ The alignment of the [`title`][(c).] depends on whether
19
+ this app bar is [`large`][(c).] or not.
20
+ If it is `True`, the [`title`][(c).] is left-aligned and if it
21
+ is `False` (the default), the [`title`][(c).] is centered.
21
22
  """
22
23
 
23
24
  leading: Optional[Control] = None
24
25
  """
25
26
  A control to display at the start of this app bar.
26
27
 
27
- Typically the leading control is an [`Icon`][flet.Icon] or an
28
- [`IconButton`][flet.IconButton].
28
+ Typically the leading control is an [`Icon`][flet.] or an [`IconButton`][flet.] .
29
29
 
30
- If it is `None` and [`automatically_imply_leading = True`][flet.CupertinoAppBar.automatically_imply_leading],
30
+ If it is `None` and [`automatically_imply_leading`][(c).] is `True`,
31
31
  an appropriate button will be automatically created.
32
32
  """
33
33
 
@@ -35,7 +35,7 @@ class CupertinoAppBar(Control):
35
35
  """
36
36
  A string or a control to display in the middle of this app bar.
37
37
 
38
- Typically a [`Text`][flet.Text].
38
+ Typically a [`Text`][flet.].
39
39
  """
40
40
 
41
41
  trailing: Optional[Control] = None
@@ -54,20 +54,21 @@ class CupertinoAppBar(Control):
54
54
 
55
55
  automatically_imply_leading: Optional[bool] = None
56
56
  """
57
- Whether we should try to imply the [`leading`][flet.CupertinoAppBar.leading]
58
- control if `None`.
57
+ Whether we should try to imply the [`leading`][(c).] control if `None`.
59
58
 
60
- - If `True` and `leading` is `None`, the app bar will automatically determine an appropriate leading control.
61
- - If `False` and `leading` is `None`, the space is allocated to the `title`.
62
- - If a `leading` control is provided, this parameter has no effect.
59
+ - If `True` and [`leading`][(c).] is `None`, the app bar will automatically
60
+ determine an appropriate leading control.
61
+ - If `False` and [`leading`][(c).] is `None`,
62
+ the space is allocated to the [`title`][(c).].
63
+ - If a [`leading`][(c).] control is provided, this parameter has no effect.
63
64
  """
64
65
 
65
66
  automatically_imply_title: Optional[bool] = None
66
67
  """
67
68
  Whether we should try to imply the `title` control if `None`.
68
69
 
69
- - If True and `title` is `None`, a [`Text`][flet.Text] control containing the
70
- current route's title will be automatically filled in.
70
+ - If True and `title` is `None`, a [`Text`][flet.] control containing the
71
+ current route's title will be automatically filled in.
71
72
  - If the `title` is not `None`, this parameter has no effect.
72
73
  """
73
74
 
@@ -84,10 +85,10 @@ class CupertinoAppBar(Control):
84
85
  If `None`, the app bar will adopt the following defaults:
85
86
 
86
87
  - vertically, contents will be sized to the same height as the app bar itself minus
87
- the status bar.
88
+ the status bar.
88
89
  - horizontally, padding will be `16` pixels according to iOS specifications unless
89
- the leading widget is an automatically inserted back button, in which case the
90
- padding will be `0`.
90
+ the leading widget is an automatically inserted back button, in which case the
91
+ padding will be `0`.
91
92
 
92
93
  Note:
93
94
  Vertical padding (`top` and `bottom`) won't change the height of this app bar.
@@ -97,8 +98,8 @@ class CupertinoAppBar(Control):
97
98
  """
98
99
  Determines whether the app bar transitions between routes.
99
100
 
100
- If `True`, this app bar will animate on top of route transitions when the destination
101
- route also contains a `CupertinoAppBar` or `CupertinoSliverAppBar` with
101
+ If `True`, this app bar will animate on top of route transitions when the
102
+ destination route also contains a `CupertinoAppBar` or `CupertinoSliverAppBar` with
102
103
  `transition_between_routes` set to `True`.
103
104
 
104
105
  This transition also occurs during edge back swipe gestures, mimicking native iOS
@@ -111,42 +112,41 @@ class CupertinoAppBar(Control):
111
112
 
112
113
  previous_page_title: Optional[str] = None
113
114
  """
114
- Manually specify the previous route's title when automatically implying the leading back button.
115
+ Manually specify the previous route's title when automatically implying
116
+ the leading back button.
115
117
 
116
118
  Overrides the text shown with the back chevron instead of automatically showing the
117
- previous route's title when [`automatically_imply_leading`][flet.CupertinoAppBar.automatically_imply_leading]
118
- is `True`.
119
+ previous route's title when [`automatically_imply_leading`][(c).] is `True`.
119
120
 
120
121
  Note:
121
122
  Has no effect if `leading` is not `None` or if
122
- [`automatically_imply_leading`][flet.CupertinoAppBar.automatically_imply_leading] is `False`.
123
+ [`automatically_imply_leading`][(c).] is `False`.
123
124
  """
124
125
 
125
126
  brightness: Optional[Brightness] = None
126
127
  """
127
- The brightness of the specified [`bgcolor`][flet.CupertinoAppBar.bgcolor].
128
+ The brightness of the specified [`bgcolor`][(c).].
128
129
 
129
130
  Setting this value changes the style of the system status bar. It is typically used
130
- to increase the contrast ratio of the system status bar over `bgcolor`.
131
+ to increase the contrast ratio of the system status bar over [`bgcolor`][(c).].
131
132
 
132
133
  If `None` (the default), its value will be inferred from the relative luminance of
133
- the `bgcolor`.
134
+ the [`bgcolor`][(c).].
134
135
  """
135
136
 
136
137
  automatic_background_visibility: Optional[bool] = None
137
138
  """
138
- Whether the navigation bar should appear transparent when content is scrolled under
139
- it.
139
+ Whether the navigation bar should appear transparent
140
+ when content is scrolled under it.
140
141
 
141
- If `False`, the navigation bar will display its [`bgcolor`][flet.CupertinoAppBar.bgcolor].
142
+ If `False`, the navigation bar will display its [`bgcolor`][(c).].
142
143
  """
143
144
 
144
145
  enable_background_filter_blur: Optional[bool] = None
145
146
  """
146
- Whether to have a blur effect when a non-opaque [`bgcolor`][flet.CupertinoAppBar.bgcolor] is used.
147
+ Whether to have a blur effect when a non-opaque [`bgcolor`][(c).] is used.
147
148
 
148
- This will only be respected when
149
- [`automatic_background_visibility`][flet.CupertinoAppBar.automatic_background_visibility]
149
+ This will only be respected when [`automatic_background_visibility`][(c).]
150
150
  is `False` or until content scrolls under the navigation bar.
151
151
  """
152
152
 
@@ -154,6 +154,6 @@ class CupertinoAppBar(Control):
154
154
  """
155
155
  Whether to use a large app bar layout.
156
156
 
157
- If `True`, the title will be left-aligned and if it is `False`, the title will be
158
- centered.
157
+ If `True`, the [`title`][(c).] is left-aligned;
158
+ if `False`, the [`title`][(c).] is centered.
159
159
  """
@@ -12,23 +12,23 @@ __all__ = ["CupertinoBottomSheet"]
12
12
  @control("CupertinoBottomSheet")
13
13
  class CupertinoBottomSheet(DialogControl):
14
14
  """
15
- A Cupertino version of modal bottom sheet.
15
+ A Cupertino bottom sheet.
16
16
  """
17
17
 
18
18
  content: Control
19
19
  """
20
- The control to be displayed.
20
+ The control to be displayed in this bottom sheet.
21
21
  """
22
22
 
23
23
  modal: bool = False
24
24
  """
25
- Whether this bottom sheet can be dismissed/closed by clicking the area outside of
26
- it.
25
+ Whether this bottom sheet can be dismissed/closed by
26
+ clicking the area outside of it.
27
27
  """
28
28
 
29
29
  bgcolor: Optional[ColorValue] = None
30
30
  """
31
- The sheet's background color.
31
+ The background color of this bottom sheet.
32
32
  """
33
33
 
34
34
  height: Optional[Number] = None
@@ -49,7 +49,7 @@ class CupertinoButton(LayoutControl):
49
49
 
50
50
  icon_color: Optional[ColorValue] = None
51
51
  """
52
- The foreground color of the [`icon`][flet.CupertinoButton.icon].
52
+ The foreground color of the [`icon`][(c).].
53
53
  """
54
54
 
55
55
  bgcolor: Optional[ColorValue] = None
@@ -110,7 +110,7 @@ class CupertinoButton(LayoutControl):
110
110
  """
111
111
  The URL to open when this button is clicked.
112
112
 
113
- Additionally, if [`on_click`][flet.CupertinoButton.on_click] event callback is
113
+ Additionally, if [`on_click`][(c).] event callback is
114
114
  provided, it is fired after that.
115
115
  """
116
116
 
@@ -124,9 +124,9 @@ class CupertinoButton(LayoutControl):
124
124
  """
125
125
  The color to use for the focus highlight for keyboard interactions.
126
126
 
127
- Defaults to a slightly transparent [`bgcolor`][flet.CupertinoButton.bgcolor].
127
+ Defaults to a slightly transparent [`bgcolor`][(c).].
128
128
  If `bgcolor` is `None`, defaults to a slightly transparent
129
- [`CupertinoColors.ACTIVE_BLUE`][flet.CupertinoColors.ACTIVE_BLUE].
129
+ [`CupertinoColors.ACTIVE_BLUE`][flet.].
130
130
  'Slightly transparent' in this context means the color is used with an opacity
131
131
  of `0.80`, a brightness of `0.69` and a saturation of `0.835`.
132
132
  """
@@ -19,48 +19,47 @@ __all__ = ["CupertinoCheckbox"]
19
19
  @control("CupertinoCheckbox")
20
20
  class CupertinoCheckbox(LayoutControl):
21
21
  """
22
- A macOS style checkbox. Checkbox allows to select one or more items from a group,
22
+ A macOS style checkbox.
23
+
24
+ Checkbox allows to select one or more items from a group,
23
25
  or switch between two mutually exclusive options (checked or unchecked, on or off).
24
26
  """
25
27
 
26
28
  label: Optional[str] = None
27
29
  """
28
- The clickable label to display on the right of a checkbox.
30
+ A clickable label to display on the right of this checkbox.
29
31
  """
30
32
 
31
33
  label_position: LabelPosition = LabelPosition.RIGHT
32
34
  """
33
- Defines on which side of the checkbox the [`label`][flet.CupertinoCheckbox.label]
34
- should be shown.
35
+ Defines on which side of this checkbox the [`label`][(c).] should be shown.
35
36
  """
36
37
 
37
38
  value: Optional[bool] = False
38
39
  """
39
40
  The value of this checkbox.
40
41
 
41
- - If `True` the checkbox is checked.
42
- - If `False` the checkbox is unchecked.
43
- - If `None` and [`tristate`][flet.CupertinoCheckbox.tristate] is `True`
44
- the checkbox is indeterminate. (displayed as a dash)
42
+ - If `True`, this checkbox is checked.
43
+ - If `False`, this checkbox is unchecked.
44
+ - If `None` and [`tristate`][(c).] is `True`,
45
+ this checkbox is indeterminate (displayed as a dash).
45
46
  """
46
47
 
47
48
  tristate: bool = False
48
49
  """
49
- If `True` the checkbox's [`value`][flet.CupertinoCheckbox.value] can be `True`,
50
- `False`, or `None`.
50
+ If `True`, this checkbox's [`value`][(c).] can be `True`, `False`, or `None`.
51
51
  """
52
52
 
53
53
  autofocus: bool = False
54
54
  """
55
- Whether this control will be selected as the initial focus. If there is more than
55
+ Whether this checkbox will be selected as the initial focus. If there is more than
56
56
  one control on a page with autofocus set, then the first one added to the page will
57
57
  get focus.
58
58
  """
59
59
 
60
60
  check_color: Optional[ColorValue] = None
61
61
  """
62
- The color to use for the check icon when
63
- this checkbox is checked.
62
+ The color to use for the check icon when this checkbox is checked.
64
63
  """
65
64
 
66
65
  active_color: Optional[ColorValue] = CupertinoColors.ACTIVE_BLUE
@@ -68,34 +67,30 @@ class CupertinoCheckbox(LayoutControl):
68
67
  The color used to fill checkbox when it
69
68
  is checked/selected.
70
69
 
71
- If [`fill_color`][flet.CupertinoCheckbox.fill_color] returns a non-null color in the
72
- `ControlState.SELECTED` state, it will be used instead of this color.
73
-
74
- Defaults to `Colors.PRIMARY`.
70
+ If [`fill_color`][(c).] returns a non-null color in the
71
+ [`ControlState.SELECTED`][flet.] state, it will be used instead of this color.
75
72
  """
76
73
 
77
74
  focus_color: Optional[ColorValue] = None
78
75
  """
79
- The color used for the checkbox's border
80
- shadow when it has the input focus.
76
+ The color used for this checkbox's border shadow when it has the input focus.
81
77
  """
82
78
 
83
79
  fill_color: Optional[ControlStateValue[ColorValue]] = None
84
80
  """
85
- The color used to fill the checkbox in
86
- all or specific [`ControlState`][flet.ControlState]
81
+ The color used to fill this checkbox in all or specific [`ControlState`][flet.]
87
82
  states.
88
83
 
89
- Supported states: [`ControlState.SELECTED`][flet.ControlState.SELECTED],
90
- [`ControlState.HOVERED`][flet.ControlState.HOVERED],
91
- [`ControlState.DISABLED`][flet.ControlState.DISABLED],
92
- [`ControlState.FOCUSED`][flet.ControlState.FOCUSED],
93
- and [`ControlState.DEFAULT`][flet.ControlState.DEFAULT].
84
+ [`active_color`][(c).] is used as fallback color when
85
+ the checkbox is in the [`SELECTED`][flet.ControlState.] state,
86
+ [`CupertinoColors.WHITE`][flet.] at `50%` opacity is used as fallback color
87
+ when this checkbox is in the [`DISABLED`][flet.ControlState.] state, and
88
+ [`CupertinoColors.WHITE`][flet.] otherwise.
94
89
 
95
- [`active_color`][flet.CupertinoCheckbox.active_color] is used as fallback color when
96
- the checkbox is in the `SELECTED` state, `CupertinoColors.WHITE` at 50% opacity
97
- is used as fallback color when this checkbox is in the `DISABLED` state,
98
- and `CupertinoColors.WHITE` otherwise.
90
+ Note:
91
+ Supported states: [`ControlState.SELECTED`][flet.],
92
+ [`ControlState.HOVERED`][flet.], [`ControlState.DISABLED`][flet.],
93
+ [`ControlState.FOCUSED`][flet.], and [`ControlState.DEFAULT`][flet.].
99
94
  """
100
95
 
101
96
  shape: Optional[OutlinedBorder] = None
@@ -112,7 +107,7 @@ class CupertinoCheckbox(LayoutControl):
112
107
 
113
108
  semantics_label: Optional[str] = None
114
109
  """
115
- The semantic label for the checkbox that will be announced by screen readers.
110
+ The semantic label for this checkbox that will be announced by screen readers.
116
111
 
117
112
  This is announced by assistive technologies (e.g TalkBack/VoiceOver) and not shown
118
113
  on the UI.
@@ -121,15 +116,13 @@ class CupertinoCheckbox(LayoutControl):
121
116
  border_side: Optional[ControlStateValue[BorderSide]] = None
122
117
  """
123
118
  Defines the checkbox's border sides in all or specific
124
- [`ControlState`][flet.ControlState] states.
125
-
126
- Supported states: [`ControlState.SELECTED`][flet.ControlState.SELECTED],
127
- [`ControlState.HOVERED`][flet.ControlState.HOVERED],
128
- [`ControlState.DISABLED`][flet.ControlState.DISABLED],
129
- [`ControlState.FOCUSED`][flet.ControlState.FOCUSED],
130
- [`ControlState.PRESSED`][flet.ControlState.PRESSED],
131
- [`ControlState.ERROR`][flet.ControlState.ERROR],
132
- and [`ControlState.DEFAULT`][flet.ControlState.DEFAULT].
119
+ [`ControlState`][flet.] states.
120
+
121
+ Note:
122
+ Supported states: [`ControlState.SELECTED`][flet.],
123
+ [`ControlState.HOVERED`][flet.], [`ControlState.DISABLED`][flet.],
124
+ [`ControlState.FOCUSED`][flet.], [`ControlState.PRESSED`][flet.],
125
+ [`ControlState.ERROR`][flet.], and [`ControlState.DEFAULT`][flet.].
133
126
  """
134
127
 
135
128
  on_change: Optional[ControlEventHandler["CupertinoCheckbox"]] = None
@@ -13,18 +13,19 @@ class CupertinoContextMenu(AdaptiveControl):
13
13
 
14
14
  content: Control
15
15
  """
16
- The child control to be shown.
16
+ The content of this context menu.
17
17
 
18
- When the `CupertinoContextMenu` is long-pressed, the menu will open and this control
19
- will be moved to the new route and be expanded. This allows the child to resize to
20
- fit in its place in the new route, if it doesn't size itself.
18
+ Info:
19
+ When this context menu is long-pressed, the menu will open and this control
20
+ will be moved to the new route and be expanded. This allows the content
21
+ to resize to fit in its place in the new route, if it doesn't size itself.
21
22
  """
22
23
 
23
24
  actions: list[Control]
24
25
  """
25
26
  A list of action buttons to be shown in the menu.
26
27
 
27
- Typically [`CupertinoContextMenuAction`][flet.CupertinoContextMenuAction]s.
28
+ Typically [`CupertinoContextMenuAction`][flet.]s.
28
29
 
29
30
  Note:
30
31
  This list must have at least one visible action.
@@ -32,7 +33,7 @@ class CupertinoContextMenu(AdaptiveControl):
32
33
 
33
34
  enable_haptic_feedback: bool = True
34
35
  """
35
- Whether a click on the `actions` should produce haptic feedback.
36
+ Whether a click on the [`actions`][(c).] should produce haptic feedback.
36
37
  """
37
38
 
38
39
  def before_update(self):
@@ -13,8 +13,7 @@ class CupertinoContextMenuAction(AdaptiveControl):
13
13
  """
14
14
  A cupertino context menu action.
15
15
 
16
- Typically used as a child of
17
- [`CupertinoContextMenu.actions`][flet.CupertinoContextMenu.actions].
16
+ Typically used as a child of [`CupertinoContextMenu.actions`][flet.].
18
17
 
19
18
  Raises:
20
19
  AssertionError: If [`content`][(c).] is neither a string nor a visible Control.
@@ -37,8 +36,7 @@ class CupertinoContextMenuAction(AdaptiveControl):
37
36
 
38
37
  trailing_icon: Optional[IconData] = None
39
38
  """
40
- An optional icon to display at the right of the
41
- [`content`][flet.CupertinoContextMenuAction.content] control.
39
+ An icon to display at the right of the [`content`][(c).] control.
42
40
  """
43
41
 
44
42
  on_click: Optional[ControlEventHandler["CupertinoContextMenuAction"]] = None
@@ -38,9 +38,11 @@ class CupertinoDatePicker(LayoutControl):
38
38
 
39
39
  value: DateTimeValue = field(default_factory=lambda: datetime.now())
40
40
  """
41
- The initial date and/or time of the picker. It must conform to the intervals
42
- set in `first_date`, `last_date`, `min_year`, and `max_year` else an error
43
- will be `ValueError` will be raised.
41
+ The initial date and/or time of the picker.
42
+
43
+ It must conform to the intervals set in [`first_date`][(c).], [`last_date`][(c).],
44
+ [`minimum_year`][(c).], and [`maximum_year`][(c).],
45
+ else a `ValueError` will be raised.
44
46
 
45
47
  Defaults to the present date and time.
46
48
  """
@@ -49,45 +51,43 @@ class CupertinoDatePicker(LayoutControl):
49
51
  """
50
52
  The earliest allowable date that the user can select.
51
53
 
52
- Defaults to `None` - no limit.
53
-
54
- When not `None` (no limit), one can still scroll the picker to dates earlier than
55
- `first_date`, with the exception that the
56
- [`on_change`][flet.CupertinoDatePicker.on_change] will not be called.
57
- Once let go, the picker will scroll back to `first_date`.
54
+ - If set to `None` (the default), there is no lower date limit.
55
+ - When not `None`, one can still scroll the picker to dates earlier than
56
+ `first_date`, with the exception that the [`on_change`][(c).] will not be
57
+ called. Once let go, the picker will scroll back to `first_date`.
58
58
 
59
- In `CupertinoDatePickerMode.TIME` mode, a time becomes unselectable if the
60
- datetime produced by combining that particular time and the date part of
61
- initialDateTime is earlier than `last_date`. So typically `first_date` needs
62
- to be set to a datetime that is on the same date as initialDateTime.
59
+ Note:
60
+ In [`CupertinoDatePickerMode.TIME`][flet.] mode, a time becomes unselectable
61
+ if the datetime produced by combining that particular time and the date part of
62
+ [`value`][(c).] is earlier than `last_date`. So typically, `first_date` needs
63
+ to be set to a datetime that is on the same date as [`value`][(c).].
63
64
  """
64
65
 
65
66
  last_date: Optional[DateTimeValue] = None
66
67
  """
67
68
  The latest allowable date that the user can select.
68
69
 
69
- When not `None`, one can still scroll the picker to dates later than
70
- `last_date`, with the exception that the `on_change` will not be called.
71
- Once let go, the picker will scroll back to `last_date`.
70
+ - If set to `None` (the default), there is no upper date limit.
71
+ - When not `None`, one can still scroll the picker to dates later than
72
+ `last_date`, with the exception that the [`on_change`][(c).] will not be called.
73
+ Once let go, the picker will scroll back to `last_date`.
72
74
 
73
- In [`CupertinoDatePickerMode.TIME`][flet.CupertinoDatePickerMode.TIME] mode,
74
- a time becomes unselectable if the
75
- datetime produced by combining that particular time and the date part of
76
- initialDateTime is later than `last_date`. So typically `last_date` needs to
77
- be set to a datetime that is on the same date as initialDateTime.
78
-
79
- Defaults to `None` - no limit.
75
+ Note:
76
+ In [`CupertinoDatePickerMode.TIME`][flet.] mode, a time becomes unselectable
77
+ if the datetime produced by combining that particular time and the date part
78
+ of [`value`][(c).] is later than `last_date`. So typically, `last_date` needs
79
+ to be set to a datetime that is on the same date as [`value`][(c).].
80
80
  """
81
81
 
82
82
  bgcolor: Optional[ColorValue] = None
83
83
  """
84
- The background color of the date picker.
84
+ The background color of this date picker.
85
85
  """
86
86
 
87
87
  minute_interval: int = 1
88
88
  """
89
89
  The granularity of the minutes spinner, if it is shown in the current
90
- [`date_picker_mode`][flet.CupertinoDatePicker.date_picker_mode].
90
+ [`date_picker_mode`][(c).].
91
91
 
92
92
  Note:
93
93
  Must be an integer factor of `60`.
@@ -96,13 +96,13 @@ class CupertinoDatePicker(LayoutControl):
96
96
  minimum_year: int = 1
97
97
  """
98
98
  Minimum year to which the picker can be scrolled when in
99
- [`CupertinoDatePickerMode.DATE`][flet.CupertinoDatePickerMode.DATE] mode.
99
+ [`CupertinoDatePickerMode.DATE`][flet.] mode.
100
100
  """
101
101
 
102
102
  maximum_year: Optional[int] = None
103
103
  """
104
104
  Maximum year to which the picker can be scrolled when in
105
- [`CupertinoDatePickerMode.DATE`][flet.CupertinoDatePickerMode.DATE] mode.
105
+ [`CupertinoDatePickerMode.DATE`][flet.] mode.
106
106
 
107
107
  Defaults to `None` - no limit.
108
108
  """
@@ -135,21 +135,19 @@ class CupertinoDatePicker(LayoutControl):
135
135
 
136
136
  Note:
137
137
  The final order in which the columns are displayed is also influenced by
138
- the [`date_picker_mode`][flet.CupertinoDatePicker.date_picker_mode].
139
- For example,if `date_picker_mode` is
140
- [`CupertinoDatePickerMode.MONTH_YEAR`][flet.CupertinoDatePickerMode.MONTH_YEAR]
141
- both [`CupertinoDatePickerDateOrder.DAY_MONTH_YEAR`][flet.CupertinoDatePickerDateOrder.DAY_MONTH_YEAR] and
142
- [`CupertinoDatePickerDateOrder.MONTH_DAY_YEAR`][flet.CupertinoDatePickerDateOrder.MONTH_DAY_YEAR] will result in the month|year order.
143
- """ # noqa: E501
138
+ the [`date_picker_mode`][(c).]. For example, if `date_picker_mode` is
139
+ [`CupertinoDatePickerMode.MONTH_YEAR`][flet.]
140
+ both [`CupertinoDatePickerDateOrder.DAY_MONTH_YEAR`][flet.] and
141
+ [`CupertinoDatePickerDateOrder.MONTH_DAY_YEAR`][flet.] will result
142
+ in the `month|year` order.
143
+ """
144
144
 
145
145
  on_change: Optional[ControlEventHandler["CupertinoDatePicker"]] = None
146
146
  """
147
147
  Called when the selected date and/or time changes.
148
148
 
149
- Will not fire if the new
150
- selected value is not valid, or is not in the range of
151
- [`first_date`][flet.CupertinoDatePicker.first_date] and
152
- [`last_date`][flet.CupertinoDatePicker.last_date].
149
+ Will not be called if the new selected value is not valid,
150
+ or is not in the range of [`first_date`][(c).] and [`last_date`][(c).].
153
151
  """
154
152
 
155
153
  def before_update(self):
@@ -14,7 +14,7 @@ class CupertinoDialogAction(Control):
14
14
  """
15
15
  A dialog action button.
16
16
 
17
- Typically used as a child of [`CupertinoAlertDialog.actions`][flet.CupertinoAlertDialog.actions].
17
+ Typically used as a child of [`CupertinoAlertDialog.actions`][flet.].
18
18
 
19
19
  Raises:
20
20
  AssertionError: If [`content`][(c).] is neither a string nor a visible Control.
@@ -27,29 +27,32 @@ class CupertinoDialogAction(Control):
27
27
 
28
28
  default: bool = False
29
29
  """
30
- Whether this action is a default action. In this case, the button will have bold text.
30
+ Whether this action is a default action.
31
+ In this case, the button will have bold text.
31
32
 
32
33
  Info:
33
- More than one action can have
34
- this property set to `True` in [`CupertinoAlertDialog`][flet.CupertinoAlertDialog].
34
+ Multiple actions can have this property set to `True`
35
+ in a [`CupertinoAlertDialog`][flet.].
35
36
  """
36
37
 
37
38
  destructive: bool = False
38
39
  """
39
- If set to True, the button's text color will be red. Use it for actions that
40
- destroy objects, such as an delete that deletes an email etc.
40
+ If set to `True`, this button's text color will be red.
41
+
42
+ Typically used for actions that destroy objects,
43
+ such as an delete that deletes an email etc.
41
44
  """
42
45
 
43
46
  text_style: Optional[TextStyle] = None
44
47
  """
45
- The text style to use for text in the button.
48
+ The text style to use for text in this button.
46
49
 
47
- Can be useful when [`content`][flet.CupertinoDialogAction.content] is a string.
50
+ Can be useful when [`content`][(c).] is a string.
48
51
  """
49
52
 
50
53
  on_click: Optional[ControlEventHandler["CupertinoDialogAction"]] = None
51
54
  """
52
- Called when a user clicks the button.
55
+ Called when a user clicks this button.
53
56
  """
54
57
 
55
58
  def before_update(self):