InternalPageWidget class abstract
Class for displaying the internal page.
As with UIMaterialApp, you can specify initialRoute androutes and
use navigator.pushName()
to transition pages.
It inherits from HookWidget, so you can use the flutter_hooks function.
class Main extends PageHookWidget {
@override
final get initialRoute = "/home";
@override
final Map<String, RouteConfig> routes = {
"/home": RouteConfig((_) => Home()),
"/notfound": RouteConfig((_) => NotFound()),
};
@override
final RouteConfig onUnknownRoute = RouteConfig((_) => Unknown());
}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PageHookWidget
- InternalPageWidget
Constructors
- InternalPageWidget({Key? key})
- Used to display a page within a page.
Properties
- applySafeArea → bool
-
True to apply safe area to Body.
no setterinherited
- context → BuildContext
-
Build context.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialRoute → String
-
The name of the first route on the page.
no setter
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
Keys for the navigator.
no setter
- onUnknownRoute → RouteConfig
-
Page when a route name is specified that is not defined in the route.
no setter
-
routes
→ Map<
String, RouteConfig> -
Setting up a route.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Creating a body.
override
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDidInit(
BuildContext context) → void -
Callback method that is executed when the initialization is finished.
inherited
-
onDispose(
) → void -
Widget will be executed when the widget is destroyed.
inherited
-
onInit(
) → void -
Callback method to be executed during initialization.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited