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
flet/__init__.py CHANGED
@@ -252,6 +252,7 @@ from flet.controls.material.date_picker import (
252
252
  DatePickerEntryModeChangeEvent,
253
253
  DatePickerMode,
254
254
  )
255
+ from flet.controls.material.date_range_picker import DateRangePicker
255
256
  from flet.controls.material.divider import Divider
256
257
  from flet.controls.material.dropdown import Dropdown, DropdownOption
257
258
  from flet.controls.material.dropdownm2 import DropdownM2
@@ -624,6 +625,7 @@ __all__ = [
624
625
  "DatePickerEntryModeChangeEvent",
625
626
  "DatePickerMode",
626
627
  "DatePickerTheme",
628
+ "DateRangePicker",
627
629
  "DateTimeValue",
628
630
  "DecorationImage",
629
631
  "DialogControl",
@@ -10,29 +10,32 @@ __all__ = ["AdaptiveControl"]
10
10
  class AdaptiveControl(Control):
11
11
  """
12
12
  Base class for controls that support adaptive behavior, which allows them to adjust
13
- their appearance and behavior based on the target platform (ex: Material design on Android/Windows/Linux,
14
- Cupertino design on iOS/macOS).
13
+ their appearance and behavior based on the target platform
14
+ (ex: Material design on Android/Windows/Linux, Cupertino design on iOS/macOS).
15
15
 
16
16
  The [`adaptive`][(c).] property is applicable in two common scenarios:
17
17
 
18
18
  1. **Platform-adaptive controls**:
19
- These controls have a corresponding version on both Material and Cupertino platforms.
20
- When `adaptive` is set to `True`, the control renders the appropriate platform-specific
21
- implementation.
19
+ These controls have a corresponding version on both Material and Cupertino
20
+ platforms. When `adaptive` is set to `True`, the control renders the
21
+ appropriate platform-specific implementation.
22
22
 
23
23
  2. **Container controls**:
24
- Controls that contain children (ex: [`Row`][flet.Row], [`Column`][flet.Column]) can pass
25
- the `adaptive` value down to their children that do not explicitly define it themselves.
26
- This enables nested adaptive behavior in complex layouts.
24
+ Controls that contain children (ex: [`Row`][flet.], [`Column`][flet.]) can pass
25
+ the `adaptive` value down to their children that do not explicitly define it
26
+ themselves. This enables nested adaptive behavior in complex layouts.
27
27
 
28
- Extension developers can use this base class to create their own adaptive controls by
29
- checking the `adaptive` flag at runtime and rendering accordingly.
28
+ Extension developers can use this base class to create their own adaptive controls
29
+ by checking the `adaptive` flag at runtime and rendering accordingly.
30
30
 
31
31
  Note:
32
32
  This class does not implement any platform-specific rendering itself.
33
- It is up to the control inheriting from it to interpret the [`adaptive`][(c).] flag and render accordingly.
33
+ It is up to the control inheriting from it to interpret the [`adaptive`][(c).]
34
+ flag and render accordingly.
34
35
  """
36
+
35
37
  adaptive: Optional[bool] = None
36
38
  """
37
- Enables platform-specific rendering or inheritance of adaptiveness from parent controls.
38
- """
39
+ Enables platform-specific rendering or inheritance of adaptiveness
40
+ from parent controls.
41
+ """
@@ -167,8 +167,8 @@ class BasePage(AdaptiveControl):
167
167
  - This property is read-only.
168
168
  - To get or set the full window height including window chrome (e.g.,
169
169
  title bar and borders) when running a Flet app on desktop,
170
- use the [`width`][flet.Window.width] property of
171
- [`Page.window`][flet.Page.window] instead.
170
+ use the [`width`][flet.Window.] property of
171
+ [`Page.window`][flet.] instead.
172
172
  """
173
173
 
174
174
  height: Optional[Number] = None
@@ -179,8 +179,8 @@ class BasePage(AdaptiveControl):
179
179
  - This property is read-only.
180
180
  - To get or set the full window height including window chrome (e.g.,
181
181
  title bar and borders) when running a Flet app on desktop,
182
- use the [`height`][flet.Window.height] property of
183
- [`Page.window`][flet.Page.window] instead.
182
+ use the [`height`][flet.Window.] property of
183
+ [`Page.window`][flet.] instead.
184
184
  """
185
185
 
186
186
  title: Optional[str] = None
@@ -306,7 +306,7 @@ class BasePage(AdaptiveControl):
306
306
  This method adds the specified `dialog` to the active dialog stack
307
307
  and renders it on the page. If the dialog is already open, an exception
308
308
  is raised.
309
- The [`on_dismiss`][flet.DialogControl.on_dismiss] handler of the dialog
309
+ The [`on_dismiss`][flet.DialogControl.] handler of the dialog
310
310
  is temporarily wrapped to ensure the dialog is removed from the stack and
311
311
  its dismissal event is triggered appropriately.
312
312
 
flet/controls/border.py CHANGED
@@ -66,8 +66,9 @@ class BorderSide:
66
66
  This means that it will render faster than otherwise, but it might
67
67
  double-hit pixels, giving it a slightly darker/lighter result.
68
68
 
69
- To omit the border entirely, set the [`style`][flet.BorderSide.style]
70
- to [`BorderStyle.NONE`][flet.BorderStyle.NONE].
69
+ Tip:
70
+ To omit the border entirely, set the [`style`][(c).]
71
+ to [`BorderStyle.NONE`][flet.].
71
72
  """
72
73
 
73
74
  color: ColorValue = Colors.BLACK
@@ -161,7 +162,7 @@ class Border:
161
162
  A border comprised of four sides: `top`, `right`, `bottom`, `left`.
162
163
 
163
164
  Each side of the border is an instance of
164
- [`BorderSide`][flet.BorderSide].
165
+ [`BorderSide`][flet.].
165
166
 
166
167
  Example:
167
168
  ```python
flet/controls/box.py CHANGED
@@ -300,15 +300,13 @@ class BoxDecoration:
300
300
 
301
301
  image: Optional[DecorationImage] = None
302
302
  """
303
- An image to paint above the background [`bgcolor`][flet.BoxDecoration.bgcolor]
304
- or [`gradient`][flet.BoxDecoration.gradient].
303
+ An image to paint above the background [`bgcolor`][(c).] or [`gradient`][(c).].
305
304
  """
306
305
 
307
306
  border: Optional[Border] = None
308
307
  """
309
- A border to draw above the background
310
- [`bgcolor`][flet.BoxDecoration.bgcolor], [`gradient`][flet.BoxDecoration.gradient],
311
- and [`image`][flet.BoxDecoration.image].
308
+ A border to draw above the background [`bgcolor`][(c).], [`gradient`][(c).],
309
+ and [`image`][(c).].
312
310
  """
313
311
 
314
312
  border_radius: Optional[BorderRadiusValue] = None
@@ -328,16 +326,13 @@ class BoxDecoration:
328
326
 
329
327
  shape: BoxShape = BoxShape.RECTANGLE
330
328
  """
331
- The shape to fill the [`bgcolor`][flet.BoxDecoration.bgcolor],
332
- [`gradient`][flet.BoxDecoration.gradient], and [`image`][
333
- flet.BoxDecoration.image] into and to cast as the
334
- [`shadows`][flet.BoxDecoration.shadows].
329
+ The shape to fill the [`bgcolor`][(c).], [`gradient`][(c).], and [`image`][(c).]
330
+ into and to cast as the [`shadows`][(c).].
335
331
  """
336
332
 
337
333
  blend_mode: Optional[BlendMode] = None
338
334
  """
339
- The blend mode to apply to the background [`bgcolor`][flet.BoxDecoration.bgcolor]
340
- or [`gradient`][flet.BoxDecoration.gradient].
335
+ The blend mode to apply to the background [`bgcolor`][(c).] or [`gradient`][(c).].
341
336
  """
342
337
 
343
338
  def __post_init__(self):
flet/controls/buttons.py CHANGED
@@ -34,7 +34,7 @@ class ShapeBorder:
34
34
 
35
35
  See subclasses/implementations:
36
36
 
37
- - [`OutlinedBorder`][flet.OutlinedBorder]
37
+ - [`OutlinedBorder`][flet.]
38
38
  """
39
39
 
40
40
 
@@ -45,11 +45,11 @@ class OutlinedBorder(ShapeBorder):
45
45
 
46
46
  See subclasses/implementations:
47
47
 
48
- - [`BeveledRectangleBorder`][flet.BeveledRectangleBorder]
49
- - [`ContinuousRectangleBorder`][flet.ContinuousRectangleBorder]
50
- - [`CircleBorder`][flet.CircleBorder]
51
- - [`RoundedRectangleBorder`][flet.RoundedRectangleBorder]
52
- - [`StadiumBorder`][flet.StadiumBorder]
48
+ - [`BeveledRectangleBorder`][flet.]
49
+ - [`ContinuousRectangleBorder`][flet.]
50
+ - [`CircleBorder`][flet.]
51
+ - [`RoundedRectangleBorder`][flet.]
52
+ - [`StadiumBorder`][flet.]
53
53
  """
54
54
 
55
55
  side: Optional[BorderSide] = None
@@ -194,7 +194,7 @@ class ButtonStyle:
194
194
  background and shadow colors, content padding, border width and radius.
195
195
 
196
196
  Most of these style attributes could be configured for all or particular
197
- [`ControlState`][flet.ControlState] of a button,
197
+ [`ControlState`][flet.] of a button,
198
198
  such as `HOVERED`, `FOCUSED`, `DISABLED` and others.
199
199
  """
200
200
 
flet/controls/context.py CHANGED
@@ -10,13 +10,13 @@ class Context:
10
10
  Manages the context for Flet controls, including page reference
11
11
  and auto-update behavior.
12
12
 
13
- Context instance is accessed via [`ft.context`][flet.context].
13
+ Context instance is accessed via [`flet.context`][flet.context].
14
14
  """
15
15
 
16
16
  @property
17
17
  def page(self) -> "Page":
18
18
  """
19
- Returns the current [`Page`][flet.Page] associated with the context.
19
+ Returns the current [`Page`][flet.] associated with the context.
20
20
 
21
21
  For example:
22
22
 
flet/controls/control.py CHANGED
@@ -19,13 +19,16 @@ class Control(BaseControl):
19
19
 
20
20
  expand: Optional[Union[bool, int]] = None
21
21
  """
22
- Specifies whether/how this control should expand to fill available space in its parent layout.
22
+ Specifies whether/how this control should expand to fill available space in its
23
+ parent layout.
23
24
 
24
- More information [here](https://docs.flet-docs.pages.dev/cookbook/expanding-controls/#expand).
25
+ More information
26
+ [here](https://docs.flet-docs.pages.dev/cookbook/expanding-controls/#expand).
25
27
 
26
28
  Note:
27
- Has effect only if the direct parent of this control is one of the following controls, or their subclasses:
28
- [`Column`][flet.Column], [`Row`][flet.Row], [`View`][flet.View], [`Page`][flet.Page].
29
+ Has effect only if the direct parent of this control is one of the following
30
+ controls, or their subclasses: [`Column`][flet.], [`Row`][flet.],
31
+ [`View`][flet.], [`Page`][flet.].
29
32
  """
30
33
 
31
34
  expand_loose: bool = False
@@ -33,25 +36,28 @@ class Control(BaseControl):
33
36
  Allows the control to expand along the main axis if space is available,
34
37
  but does not require it to fill all available space.
35
38
 
36
- More information [here](https://docs.flet-docs.pages.dev/cookbook/expanding-controls/#expand_loose).
39
+ More information
40
+ [here](https://docs.flet-docs.pages.dev/cookbook/expanding-controls/#expand_loose).
37
41
 
38
42
  Note:
39
43
  If `expand_loose` is `True`, it will have effect only if:
40
44
 
41
45
  - `expand` is not `None` and
42
- - the direct parent of this control is one of the following controls, or their subclasses:
43
- [`Column`][flet.Column], [`Row`][flet.Row], [`View`][flet.View], [`Page`][flet.Page].
46
+ - the direct parent of this control is one of the following controls, or their
47
+ subclasses: [`Column`][flet.], [`Row`][flet.], [`View`][flet.],
48
+ [`Page`][flet.].
44
49
  """
45
50
 
46
- col: ResponsiveNumber = 12 # todo: if dict, validate keys with those in parent (ResponsiveRow.breakpoints)
51
+ # todo: if dict, validate keys with those in parent (ResponsiveRow.breakpoints)
52
+ col: ResponsiveNumber = 12
47
53
  """
48
- If a parent of this control is a [`ResponsiveRow`][flet.ResponsiveRow],
54
+ If a parent of this control is a [`ResponsiveRow`][flet.],
49
55
  this property is used to determine
50
56
  how many virtual columns of a screen this control will span.
51
57
 
52
58
  Can be a number or a dictionary configured to have a different value for specific
53
59
  breakpoints, for example `col={"sm": 6}`.
54
-
60
+
55
61
  This control spans the 12 virtual columns by default.
56
62
 
57
63
  /// details | Dimensions
@@ -99,7 +105,8 @@ class Control(BaseControl):
99
105
  its children are enabled.
100
106
 
101
107
  Note:
102
- The value of this property will be propagated down to all children controls recursively.
108
+ The value of this property will be propagated down to all children controls
109
+ recursively.
103
110
 
104
111
  /// details | Example
105
112
  type: example
@@ -27,39 +27,35 @@ class AnimatedSwitcher(LayoutControl):
27
27
 
28
28
  content: Control
29
29
  """
30
- The content to display. When the [`content`][flet.AnimatedSwitcher.content] changes,
31
- this switcher will animate the transition from the old/previous
32
- [`content`][flet.AnimatedSwitcher.content] to the new one.
30
+ The content to display.
31
+
32
+ When it changes, this switcher will animate the transition from the old/previous
33
+ `content` to the new one.
33
34
  """
34
35
 
35
36
  duration: DurationValue = field(default_factory=lambda: Duration(seconds=1))
36
37
  """
37
- The duration of the transition from the old
38
- [`content`][flet.AnimatedSwitcher.content] to the new one.
38
+ The duration of the transition from the old [`content`][(c).] to the new one.
39
39
  """
40
40
 
41
41
  reverse_duration: DurationValue = field(default_factory=lambda: Duration(seconds=1))
42
42
  """
43
- The duration of the transition from the new
44
- [`content`][flet.AnimatedSwitcher.content] to the old one.
43
+ The duration of the transition from the new [`content`][(c).] to the old one.
45
44
  """
46
45
 
47
46
  switch_in_curve: AnimationCurve = AnimationCurve.LINEAR
48
47
  """
49
- The animation curve to use when transitioning in a
50
- new [`content`][flet.AnimatedSwitcher.content].
48
+ The animation curve to use when transitioning in a new [`content`][(c).].
51
49
  """
52
50
 
53
51
  switch_out_curve: AnimationCurve = AnimationCurve.LINEAR
54
52
  """
55
- The animation curve to use when transitioning an old
56
- [`content`][flet.AnimatedSwitcher.content] out.
53
+ The animation curve to use when transitioning an old [`content`][(c).] out.
57
54
  """
58
55
 
59
56
  transition: AnimatedSwitcherTransition = AnimatedSwitcherTransition.FADE
60
57
  """
61
- An animation type to transition between new and old
62
- [`content`][flet.AnimatedSwitcher.content].
58
+ An animation type to transition between new and old [`content`][(c).].
63
59
  """
64
60
 
65
61
  def before_update(self):
@@ -45,7 +45,7 @@ class Canvas(LayoutControl):
45
45
  """
46
46
  Sampling interval in milliseconds for `on_resize` event.
47
47
 
48
- Setting to `0` calls [`on_resize`][flet.canvas.Canvas.on_resize] immediately
48
+ Setting to `0` calls [`on_resize`][(c).] immediately
49
49
  on every change.
50
50
  """
51
51
 
@@ -14,9 +14,8 @@ class Line(Shape):
14
14
  Draws a line between the given points using the given paint.
15
15
 
16
16
  Note:
17
- The line is always rendered as a stroke,
18
- regardless of the value of [`paint`][(c).]'s
19
- [`style`][flet.Paint.style] property.
17
+ The line is always rendered as a stroke, regardless of the value
18
+ of [`paint`][(c).]'s [`style`][flet.Paint.] property.
20
19
  """
21
20
 
22
21
  x1: Number
@@ -14,7 +14,7 @@ class Oval(Shape):
14
14
  Draws an axis-aligned oval that fills the given
15
15
  axis-aligned rectangle with the given [`paint`][(c).].
16
16
 
17
- The [`style`][flet.Paint.style] property of [`paint`][(c).] indicates
17
+ The [`style`][flet.Paint.] property of [`paint`][(c).] indicates
18
18
  whether this oval is filled, stroked, or both.
19
19
  """
20
20
 
@@ -9,14 +9,14 @@ class Shape(BaseControl):
9
9
 
10
10
  See subclasses/implementations:
11
11
 
12
- - [`Arc`][flet.canvas.Arc]
13
- - [`Circle`][flet.canvas.Circle]
14
- - [`Color`][flet.canvas.Color]
15
- - [`Fill`][flet.canvas.Fill]
16
- - [`Line`][flet.canvas.Line]
17
- - [`Oval`][flet.canvas.Oval]
18
- - [`Path`][flet.canvas.Path]
19
- - [`Points`][flet.canvas.Points]
20
- - [`Rect`][flet.canvas.Rect]
21
- - [`Text`][flet.canvas.Text]
12
+ - [`Arc`][flet.canvas.]
13
+ - [`Circle`][flet.canvas.]
14
+ - [`Color`][flet.canvas.]
15
+ - [`Fill`][flet.canvas.]
16
+ - [`Line`][flet.canvas.]
17
+ - [`Oval`][flet.canvas.]
18
+ - [`Path`][flet.canvas.]
19
+ - [`Points`][flet.canvas.]
20
+ - [`Rect`][flet.canvas.]
21
+ - [`Text`][flet.canvas.]
22
22
  """
@@ -40,7 +40,7 @@ class Text(Shape):
40
40
 
41
41
  spans: Optional[list[TextSpan]] = None
42
42
  """
43
- The list of [`TextSpan`][flet.TextSpan]
43
+ The list of [`TextSpan`][flet.]
44
44
  objects to build a rich text paragraph.
45
45
  """
46
46
 
@@ -29,14 +29,14 @@ class Column(LayoutControl, ScrollableControl, AdaptiveControl):
29
29
 
30
30
  horizontal_alignment: CrossAxisAlignment = CrossAxisAlignment.START
31
31
  """
32
- Defines how the [`controls`][flet.Column.controls] should be placed horizontally.
32
+ Defines how the [`controls`][(c).] should be placed horizontally.
33
33
  """
34
34
 
35
35
  spacing: Number = 10
36
36
  """
37
37
  Spacing between the `controls`.
38
38
 
39
- It is applied only when [`alignment`][flet.Column.alignment] is
39
+ It is applied only when [`alignment`][(c).] is
40
40
  `MainAxisAlignment.START`, `MainAxisAlignment.END` or `MainAxisAlignment.CENTER`.
41
41
  """
42
42
 
@@ -50,18 +50,18 @@ class Column(LayoutControl, ScrollableControl, AdaptiveControl):
50
50
 
51
51
  wrap: bool = False
52
52
  """
53
- Whether the [`controls`][flet.Column.controls] should wrap into additional
53
+ Whether the [`controls`][(c).] should wrap into additional
54
54
  columns (runs) when they don't fit in a single vertical column.
55
55
  """
56
56
 
57
57
  run_spacing: Number = 10
58
58
  """
59
- The spacing between runs when [`wrap`][flet.Column.wrap] is `True`.
59
+ The spacing between runs when [`wrap`][(c).] is `True`.
60
60
  """
61
61
 
62
62
  run_alignment: MainAxisAlignment = MainAxisAlignment.START
63
63
  """
64
- How the runs should be placed in the cross-axis when [`wrap`][flet.Column.wrap]
64
+ How the runs should be placed in the cross-axis when [`wrap`][(c).]
65
65
  is `True`.
66
66
  """
67
67
 
@@ -58,20 +58,20 @@ class Dismissible(LayoutControl, AdaptiveControl):
58
58
 
59
59
  background: Optional[Control] = None
60
60
  """
61
- A control that is stacked behind the [`content`][flet.Dismissible.content].
61
+ A control that is stacked behind the [`content`][(c).].
62
62
 
63
- If [`secondary_background`][flet.Dismissible.secondary_background] is also
63
+ If [`secondary_background`][(c).] is also
64
64
  specified, then this control only appears when the content has been dragged
65
65
  down or to the right.
66
66
  """
67
67
 
68
68
  secondary_background: Optional[Control] = None
69
69
  """
70
- A control that is stacked behind the [`content`][flet.Dismissible.content] and is
70
+ A control that is stacked behind the [`content`][(c).] and is
71
71
  exposed when it has been dragged up or to the left.
72
72
 
73
73
  Note:
74
- Can only be specified if [`background`][flet.Dismissible.background] is also
74
+ Can only be specified if [`background`][(c).] is also
75
75
  specified/visible.
76
76
  """
77
77
 
@@ -86,7 +86,7 @@ class Dismissible(LayoutControl, AdaptiveControl):
86
86
  """
87
87
  The offset threshold the item has to be dragged in order to be considered
88
88
  as dismissed. This is specified as a dictionary where the key is of
89
- type [`DismissDirection`][flet.DismissDirection] and the value is the threshold
89
+ type [`DismissDirection`][flet.] and the value is the threshold
90
90
  (a fractional/decimal value between `0.0` and `1.0`, inclusive).
91
91
 
92
92
  Example:
@@ -105,7 +105,7 @@ class Dismissible(LayoutControl, AdaptiveControl):
105
105
  default_factory=lambda: Duration(milliseconds=200)
106
106
  )
107
107
  """
108
- The duration for [`content`][flet.Dismissible.content] to dismiss or
108
+ The duration for [`content`][(c).] to dismiss or
109
109
  to come back to original position if not dismissed.
110
110
  """
111
111
 
@@ -114,13 +114,13 @@ class Dismissible(LayoutControl, AdaptiveControl):
114
114
  )
115
115
  """
116
116
  The amount of time the control will spend contracting
117
- before [`on_dismiss`][flet.Dismissible.on_dismiss] is called.
117
+ before [`on_dismiss`][(c).] is called.
118
118
  """
119
119
 
120
120
  cross_axis_end_offset: Number = 0.0
121
121
  """
122
122
  Specifies the end offset along the main axis once the
123
- [`content`][flet.Dismissible.content] has been dismissed.
123
+ [`content`][(c).] has been dismissed.
124
124
 
125
125
  If set to a non-zero value, then this dismissible moves in cross direction
126
126
  depending on whether it is positive or negative.
@@ -9,8 +9,8 @@ from flet.controls.transform import Offset
9
9
  __all__ = [
10
10
  "DragTarget",
11
11
  "DragTargetEvent",
12
- "DragWillAcceptEvent",
13
12
  "DragTargetLeaveEvent",
13
+ "DragWillAcceptEvent",
14
14
  ]
15
15
 
16
16
 
@@ -39,7 +39,8 @@ class DragTargetLeaveEvent(Event["DragTarget"]):
39
39
  @control("DragTarget")
40
40
  class DragTarget(Control):
41
41
  """
42
- A control that completes drag operation when a [`Draggable`][flet.Draggable] control is dropped.
42
+ A control that completes drag operation when a [`Draggable`][flet.] control
43
+ is dropped.
43
44
 
44
45
  When a `Draggable` is dragged on top of a `DragTarget`, the `DragTarget` is asked
45
46
  whether it will accept the data the `Draggable` is carrying. The `DragTarget` will
@@ -62,7 +63,7 @@ class DragTarget(Control):
62
63
  The group this target belongs to.
63
64
 
64
65
  Note:
65
- For a `DragTarget` to accept an incoming drop from a [`Draggable`][flet.Draggable],
66
+ For a `DragTarget` to accept an incoming drop from a [`Draggable`][flet.],
66
67
  they must both be in the same `group`.
67
68
  """
68
69
 
@@ -73,7 +74,7 @@ class DragTarget(Control):
73
74
 
74
75
  on_accept: Optional[EventHandler[DragTargetEvent]] = None
75
76
  """
76
- Called when the user does drop an acceptable (same [`group`][flet.DragTarget.group]) draggable on
77
+ Called when the user does drop an acceptable (same [`group`][(c).]) draggable on
77
78
  this target.
78
79
 
79
80
  Use `page.get_control(e.src_id)` to retrieve Control reference by its ID.
@@ -11,12 +11,12 @@ __all__ = ["Draggable"]
11
11
  @control("Draggable")
12
12
  class Draggable(Control):
13
13
  """
14
- A control that can be dragged from to a [`DragTarget`][flet.DragTarget].
14
+ A control that can be dragged from to a [`DragTarget`][flet.].
15
15
 
16
16
  When a draggable control recognizes the start of a drag gesture, it displays the
17
- [`content_feedback`][(c).] control that tracks the user's finger across the screen. If the
18
- user lifts their finger while on top of a `DragTarget`, this target is given the
19
- opportunity to complete drag-and-drop flow.
17
+ [`content_feedback`][(c).] control that tracks the user's finger across the screen.
18
+ If the user lifts their finger while on top of a `DragTarget`, this target is
19
+ given the opportunity to complete drag-and-drop flow.
20
20
 
21
21
  Raises:
22
22
  AssertionError: If [`content`][(c).] is not visible.
@@ -28,7 +28,7 @@ class Draggable(Control):
28
28
  The control to display when the draggable is not being dragged.
29
29
 
30
30
  If the draggable is being dragged, the
31
- [`content_when_dragging`][flet.Draggable.content_when_dragging] is displayed instead.
31
+ [`content_when_dragging`][(c).] is displayed instead.
32
32
  """
33
33
 
34
34
  group: str = "default"
@@ -36,13 +36,14 @@ class Draggable(Control):
36
36
  The group this draggable belongs to.
37
37
 
38
38
  Note:
39
- For a [`DragTarget`][flet.DragTarget] to accept an incoming drop from a `Draggable`,
39
+ For a [`DragTarget`][flet.] to accept an incoming drop from a `Draggable`,
40
40
  they must both be in the same `group`.
41
41
  """
42
42
 
43
43
  content_when_dragging: Optional[Control] = None
44
44
  """
45
- The control to display instead of [`content`][flet.Draggable.content] when this draggable is being dragged.
45
+ The control to display instead of [`content`][(c).] when this draggable
46
+ is being dragged.
46
47
 
47
48
  If set, this control visually replaces `content` during an active drag operation,
48
49
  allowing you to show a different appearance or an "empty" placeholder.
@@ -65,11 +66,14 @@ class Draggable(Control):
65
66
 
66
67
  affinity: Optional[Axis] = None
67
68
  """
68
- Specifies the axis along which this control competes with other gestures to initiate a drag.
69
+ Specifies the axis along which this control competes with other gestures to
70
+ initiate a drag.
69
71
 
70
- - If `None`, the drag starts as soon as a tap down gesture is recognized, regardless of direction.
71
- - If set to `Axis.HORIZONTAL` or `Axis.VERTICAL`, the control will only initiate a drag
72
- when the gesture matches the specified axis, allowing it to compete with other gestures in that direction.
72
+ - If `None`, the drag starts as soon as a tap down gesture is recognized,
73
+ regardless of direction.
74
+ - If set to `Axis.HORIZONTAL` or `Axis.VERTICAL`, the control will only initiate a
75
+ drag when the gesture matches the specified axis, allowing it to compete
76
+ with other gestures in that direction.
73
77
  """
74
78
 
75
79
  max_simultaneous_drags: Optional[int] = None
@@ -79,7 +83,7 @@ class Draggable(Control):
79
83
  - `0` - disables dragging entirely.
80
84
  - `1` - allows only one drag at a time.
81
85
  For a better user experience, you may want to provide an "empty" widget for
82
- [`content_when_dragging`][flet.Draggable.content_when_dragging]
86
+ [`content_when_dragging`][(c).]
83
87
  to visually indicate the item is being moved.
84
88
  - Set to any positive integer to allow that many concurrent drags.
85
89
  - If `None`, there is no limit on the number of simultaneous drags.
@@ -92,7 +96,7 @@ class Draggable(Control):
92
96
 
93
97
  on_drag_complete: Optional[ControlEventHandler["Draggable"]] = None
94
98
  """
95
- Called when this draggable is dropped and accepted by a [`DragTarget`][flet.DragTarget].
99
+ Called when this draggable is dropped and accepted by a [`DragTarget`][flet.].
96
100
  """
97
101
 
98
102
  def before_update(self):
@@ -101,5 +105,6 @@ class Draggable(Control):
101
105
  assert self.max_simultaneous_drags is None or (
102
106
  self.max_simultaneous_drags >= 0
103
107
  ), (
104
- f"max_simultaneous_drags must be greater than or equal to 0, got {self.max_simultaneous_drags}"
108
+ f"max_simultaneous_drags must be greater than or equal to 0, "
109
+ f"got {self.max_simultaneous_drags}"
105
110
  )
@@ -18,8 +18,8 @@ class GridView(LayoutControl, ScrollableControl, AdaptiveControl):
18
18
  A scrollable, 2D array of controls.
19
19
 
20
20
  It is very effective for large lists (thousands of items).
21
- Prefer it over wrapping [`Column`][flet.Column]s or
22
- [`Row`][flet.Row]s for smooth scrolling.
21
+ Prefer it over wrapping [`Column`][flet.]s or
22
+ [`Row`][flet.]s for smooth scrolling.
23
23
  """
24
24
 
25
25
  controls: list[Control] = field(default_factory=list)
@@ -87,7 +87,7 @@ class Image(LayoutControl):
87
87
  color: Optional[ColorValue] = None
88
88
  """
89
89
  If set, this color is blended with each
90
- image pixel using [`color_blend_mode`][flet.Image.color_blend_mode].
90
+ image pixel using [`color_blend_mode`][(c).].
91
91
  """
92
92
 
93
93
  color_blend_mode: Optional[BlendMode] = None
@@ -62,7 +62,7 @@ class InteractiveViewer(LayoutControl):
62
62
  The maximum allowed scale.
63
63
 
64
64
  Note:
65
- Must be greater than or equal to [`min_scale`][flet.InteractiveViewer.min_scale].
65
+ Must be greater than or equal to [`min_scale`][(c).].
66
66
  """ # noqa: E501
67
67
 
68
68
  min_scale: Number = 0.8
@@ -71,7 +71,7 @@ class InteractiveViewer(LayoutControl):
71
71
 
72
72
  Note:
73
73
  Must be greater than `0` and less than or equal
74
- to [`max_scale`][flet.InteractiveViewer.max_scale].
74
+ to [`max_scale`][(c).].
75
75
  """
76
76
 
77
77
  interaction_end_friction_coefficient: Number = 0.0000135