View
View
#
Bases: ScrollableControl, LayoutControl
View is the top most container for all other controls.
A root view is automatically created when a new user session started. From layout
perspective the View represents a Column
control, so it has a similar behavior and shares same properties.
appbar
#
appbar: AppBar | CupertinoAppBar | None = None
An AppBar control to display at the top of
the Page.
bottom_appbar
#
bottom_appbar: BottomAppBar | None = None
A BottomAppBar control to display at the bottom of
the Page.
drawer
#
drawer: NavigationDrawer | None = None
A NavigationDrawer control to
display as a panel sliding from the start edge of the view.
end_drawer
#
end_drawer: NavigationDrawer | None = None
A NavigationDrawer control to
display as a panel sliding from the end edge of the view.
floating_action_button
#
floating_action_button: FloatingActionButton | None = None
A FloatingActionButton control to display on top
of Page content.
floating_action_button_location
#
floating_action_button_location: (
FloatingActionButtonLocation | OffsetValue | None
) = None
Describes position of floating_action_button
foreground_decoration
#
foreground_decoration: BoxDecoration | None = None
The foreground decoration.
horizontal_alignment
#
horizontal_alignment: CrossAxisAlignment = START
How the child Controls should be placed horizontally.
navigation_bar
#
navigation_bar: (
NavigationBar | CupertinoNavigationBar | None
) = None
A navigation bar (NavigationBar or
CupertinoNavigationBar) control to display
at the bottom of the Page.
padding
#
padding: PaddingValue | None = field(
default_factory=lambda: all(10)
)
A space between page contents and its edges.
route
#
route: str | None = None
View's route - not currently used by Flet framework, but can be used in a user
program to update Page.route when a view popped.
spacing
#
spacing: Number = 10
The vertical spacing between controls on the Page.
Note
Has effect only when vertical_alignment
is set to
MainAxisAlignment.START,
MainAxisAlignment.END,
or MainAxisAlignment.CENTER.
vertical_alignment
#
vertical_alignment: MainAxisAlignment = START
Defines how the child controls should be placed vertically.