Page<State, V extends ViewModel<State> > class
abstract
A convenience mixin class that defines the structure of a page
The Page mixin provides a separation of concern between the the actual rendered widget content from the state management of that page.
flrx-cli can be used to automatically generate a widget with Page mixin
using the make:page command.
The Page mixin takes a State defined for the app and
a ViewModel defined for the widget using this mixin.
Constructors
- Page()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget - A function building the logic for the page
-
buildContent(
BuildContext context, V viewModel) → Widget - A function to build the content of the page
-
initViewModel(
) → V -
A function to initialize the
ViewModelfor the current page -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDidChange(
BuildContext context, V? previousViewModel, V newViewModel) → void - A function that will be run on State change, after the Widget is built.
-
onDispose(
Store< State> store) → void - A function that will be run when the StoreConnector is removed from the Widget Tree.
-
onInit(
Store< State> store) → void -
A function that will run when the
StoreConnectorin Page will initially be created. -
onInitialBuild(
V viewModel) → void - A function that will be run after the Widget is built the first time.
-
onWillChange(
BuildContext context, V? previousViewModel, V newViewModel) → void - A function that will be run on State change, before the Widget is built.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited