MultiView
MultiView
#
Bases: PageView
TBD
adaptive
#
adaptive: bool | None = None
Enables platform-specific rendering or inheritance of adaptiveness from parent controls.
appbar
#
appbar: AppBar | CupertinoAppBar | None
Gets or sets the top application bar (AppBar or CupertinoAppBar) for the view.
The app bar typically displays the page title and optional actions such as navigation icons, menus, or other interactive elements.
col
#
col: ResponsiveNumber = 12
If a parent of this control is a ResponsiveRow
,
this property is used to determine
how many virtual columns of a screen this control will span.
Can be a number or a dictionary configured to have a different value for specific
breakpoints, for example col={"sm": 6}
.
This control spans the 12 virtual columns by default.
Dimensions
Breakpoint | Dimension |
---|---|
xs | <576px |
sm | ≥576px |
md | ≥768px |
lg | ≥992px |
xl | ≥1200px |
xxl | ≥1400px |
dark_theme
#
dark_theme: Theme | None = None
Customizes the theme of the application when in dark theme mode.
disabled
#
disabled: bool = False
Every control has disabled
property which is False
by default - control and all
its children are enabled.
Note
The value of this property will be propagated down to all children controls recursively.
expand
#
expand_loose
#
expand_loose: bool = False
Allows the control to expand along the main axis if space is available, but does not require it to fill all available space.
More information here.
floating_action_button_location
#
floating_action_button_location: (
FloatingActionButtonLocation | OffsetValue | None
)
height
#
height: Number | None = None
Page height in logical pixels.
Note
- This property is read-only.
- To get or set the full window height including window chrome (e.g.,
title bar and borders) when running a Flet app on desktop,
use the
height
property ofPage.window
instead.
locale_configuration
#
locale_configuration: LocaleConfiguration | None = None
Configures supported locales and the current locale.
media
#
media: PageMediaData = field(
default_factory=lambda: PageMediaData(
padding=zero(),
view_padding=zero(),
view_insets=zero(),
device_pixel_ratio=0,
)
)
Represents the environmental metrics of a page or window.
on_media_change
#
on_media_change: EventHandler[PageMediaData] | None = None
Called when media
has changed.
on_resize
#
on_resize: EventHandler[PageResizeEvent] | None = None
opacity
#
opacity: Number = 1.0
Defines the transparency of the control.
Value ranges from 0.0
(completely transparent) to 1.0
(completely opaque
without any transparency).
page
#
The page (of type Page
or PageView
) to which this control belongs to.
parent
#
parent: BaseControl | None
The direct ancestor(parent) of this control.
It defaults to None
and will only have a value when this control is mounted (added to the page tree).
The Page
control (which is the root of the tree) is an exception - it always has parent=None
.
show_semantics_debugger
#
show_semantics_debugger: bool | None = None
Whether to turn on an overlay that shows the accessibility information reported by the framework.
theme
#
theme: Theme | None = None
Customizes the theme of the application when in light theme mode. Currently, a theme can only be automatically generated from a "seed" color. For example, to generate light theme from a green color.
tooltip
#
tooltip: TooltipValue | None = None
The tooltip ot show when this control is hovered over.
views
#
A list of views managed by the page.
Each View represents a distinct navigation state or screen in the application.
The first view in the list is considered the active one by default.
visible
#
visible: bool = True
Every control has visible
property which is True
by default - control is
rendered on the page. Setting visible
to False
completely prevents control (and
all its children if any) from rendering on a page canvas. Hidden controls cannot be
focused or selected with a keyboard or mouse and they do not emit any events.
width
#
width: Number | None = None
Page width in logical pixels.
Note
- This property is read-only.
- To get or set the full window height including window chrome (e.g.,
title bar and borders) when running a Flet app on desktop,
use the
width
property ofPage.window
instead.
build
#
Called once during control initialization to define its child controls. self.page is available in this method.
insert
#
Inserts controls at specific index of page.controls
list.
remove_at
#
remove_at(index: int) -> None
Remove controls from page.controls
list at specific index.
scroll_to
#
scroll_to(
offset: Number | None = None,
delta: Number | None = None,
scroll_key: str
| int
| float
| bool
| ScrollKey
| None = None,
duration: DurationValue | None = None,
curve: AnimationCurve | None = None,
) -> None
Moves scroll position to either absolute offset
, relative delta
or jump to
the control with specified scroll_key
.
See Column.scroll_to()
for method details and examples.