View
        Inherits: 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.
Properties
- 
          appbar(AppBar | CupertinoAppBar | None) –An AppBarcontrol to display at the top of
- 
          bgcolor(ColorValue | None) –Background color of the view. 
- 
          bottom_appbar(BottomAppBar | None) –A BottomAppBarcontrol to display at the bottom of
- 
          can_pop(bool) –
- 
          controls(list[BaseControl]) –A list of controls to display. 
- 
          decoration(BoxDecoration | None) –The background decoration. 
- 
          drawer(NavigationDrawer | None) –A NavigationDrawercontrol to
- 
          end_drawer(NavigationDrawer | None) –A NavigationDrawercontrol to
- 
          floating_action_button(FloatingActionButton | None) –A FloatingActionButtoncontrol to display on top
- 
          floating_action_button_location(FloatingActionButtonLocation | OffsetValue | None) –Describes position of floating_action_button
- 
          foreground_decoration(BoxDecoration | None) –The foreground decoration. 
- 
          horizontal_alignment(CrossAxisAlignment) –How the child Controls should be placed horizontally. 
- 
          navigation_bar(NavigationBar | CupertinoNavigationBar | None) –A navigation bar ( NavigationBaror
- 
          padding(PaddingValue | None) –A space between page contents and its edges. 
- 
          route(str | None) –View's route - not currently used by Flet framework, but can be used in a user 
- 
          spacing(Number) –The vertical spacing between controlson thePage.
- 
          vertical_alignment(MainAxisAlignment) –Defines how the child controlsshould be placed vertically.
Events
- 
          on_confirm_pop(ControlEventHandler[View] | None) –
Methods
Properties#
class-attribute
      instance-attribute
  
#
appbar: AppBar | CupertinoAppBar | None = None
An AppBar control to display at the top of
the Page.
class-attribute
      instance-attribute
  
#
bgcolor: ColorValue | None = None
Background color of the view.
class-attribute
      instance-attribute
  
#
bottom_appbar: BottomAppBar | None = None
A BottomAppBar control to display at the bottom of
the Page.
class-attribute
      instance-attribute
  
#
controls: list[BaseControl] = field(default_factory=list)
A list of controls to display.
class-attribute
      instance-attribute
  
#
decoration: BoxDecoration | None = None
The background decoration.
class-attribute
      instance-attribute
  
#
drawer: NavigationDrawer | None = None
A NavigationDrawer control to
display as a panel sliding from the start edge of the view.
class-attribute
      instance-attribute
  
#
end_drawer: NavigationDrawer | None = None
A NavigationDrawer control to
display as a panel sliding from the end edge of the view.
class-attribute
      instance-attribute
  
#
floating_action_button: FloatingActionButton | None = None
A FloatingActionButton control to display on top
of Page content.
class-attribute
      instance-attribute
  
#
floating_action_button_location: (
    FloatingActionButtonLocation | OffsetValue | None
) = None
Describes position of floating_action_button
class-attribute
      instance-attribute
  
#
foreground_decoration: BoxDecoration | None = None
The foreground decoration.
class-attribute
      instance-attribute
  
#
horizontal_alignment: CrossAxisAlignment = START
How the child Controls should be placed horizontally.
class-attribute
      instance-attribute
  
#
navigation_bar: (
    NavigationBar | CupertinoNavigationBar | None
) = None
A navigation bar (NavigationBar or
CupertinoNavigationBar) control to display
at the bottom of the Page.
class-attribute
      instance-attribute
  
#
padding: PaddingValue | None = field(
    default_factory=lambda: all(10)
)
A space between page contents and its edges.
class-attribute
      instance-attribute
  
#
    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.
class-attribute
      instance-attribute
  
#
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.
class-attribute
      instance-attribute
  
#
vertical_alignment: MainAxisAlignment = START
Defines how the child controls should be placed vertically.
Events#
class-attribute
      instance-attribute
  
#
on_confirm_pop: ControlEventHandler[View] | None = None