PageWithArgumentsWidget class abstract
uses this class to create a page and define the arguments for a SimpleProvider or a StateProvider
import 'package:flutter/material.dart';
import 'package:flutter_meedu/meedu.dart';
import 'package:flutter_meedu/page.dart';
final loginProvider = SimpleProvider(
(ref) => LoginController(ref.arguments),
);
class LoginPage extends PageWithArgumentsWidget {
const LoginPage({Key? key}) : super(key: key);
@override
void onInit(RouteSettings settings) {
/// you can use settings to get data passed as an argument
/// using Navigator.pushName(context,'rpute-name', arguments: data);
loginProvider.setArguments(settings.arguments);
}
@override
Widget build(BuildContext context) {
return Scaffold(
.
.
.
);
}
}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PageWithArgumentsWidget
Constructors
- PageWithArgumentsWidget({Key? key})
-
const
Properties
Methods
-
build(
BuildContext context) → Widget -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _PageWithArgumentsWidgetState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
-
onInit(
RouteSettings settings) → void - this method will be called once before render the widget and can be used to get the arguments or settings of the current route
-
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