NyPage<T extends BaseController> class
- Inheritance
- Available extensions
Constructors
- NyPage.new(String? path)
- Constructor for the NyPage class.
-
NyPage.init(String? path, State<
StatefulWidget> state) -
Initialize NyPage with a
path
andstate
.
Properties
- backpack → Backpack
-
Instance of the Backpack class
no setter
-
child
→ State<
StatefulWidget> ? -
Override the
_State
childfinal - context → BuildContext
-
Context of the state
no setter
- controller ↔ T
-
Get the route controller.
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingWidget → Widget
-
Contains the loading widget from your config/design.dart file
no setter
- mediaQuery → MediaQueryData
-
Helper to get the MediaQueryData.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → String?
-
State name
finalinherited
- textTheme → TextTheme
-
Helper to get the TextTheme.
no setter
Methods
-
boot(
) → dynamic -
The boot method called within init.
You may override this method for making asynchronous awaits.
In your build method, you can use the
afterLoad
method like in the below example. @override Widget build(BuildContext context) { return Scaffold( body: SafeAreaWidget( child: afterLoad(child: () => Container() ) ); } This will then only display the widget after the boot method has completed. -
build(
BuildContext context) → Widget - Build your UI
-
changeLanguage(
String language, {bool restartState = true}) → void - Update the language in the application
-
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.
override
-
data(
{String? key}) → dynamic -
Returns data that's sent via the Navigator or routeTo method.
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
-
faderBottom(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the bottom of the widget. -
faderFrom(
int strength, {Color color = Colors.black, List< AlignmentGeometry> alignment = const [Alignment.topCenter, Alignment.bottomCenter]}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
fader from bottom -
faderLeft(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the left of the widget. -
faderRight(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the right of the widget. -
faderTop(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the top of the widget. -
flexible(
{Key? key, int flex = 1, FlexFit fit = FlexFit.loose}) → Flexible -
Available on StatefulWidget, provided by the NyStateful extension
Make a StatefulWidget Flexible. Example: -
init(
) → dynamic - Initialize your widget in init.
-
loading(
BuildContext context) → Widget - This widget is used whenever your widget uses the boot method to load data. When data is loading via a Future in the boot method, this widget will be displayed to the user.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryParameters(
) → dynamic -
Returns query params
inherited
-
refreshPage(
{dynamic setState()?}) → void - Refresh the page
-
showToastCustom(
{String? title, required String description, ToastNotificationStyleType? style}) → void - Display a custom Toast message.
-
showToastDanger(
{String? title, required String description, ToastNotificationStyleType? style}) → void -
Displays a Toast message containing "Error" for the title, you
only need to provide a
description
. -
showToastInfo(
{String? title, required String description, ToastNotificationStyleType? style}) → void -
Displays a Toast message containing "Info" for the title, you
only need to provide a
description
. -
showToastOops(
{String? title, required String description, ToastNotificationStyleType? style}) → void -
Displays a Toast message containing "Oops" for the title, you
only need to provide a
description
. -
showToastSorry(
{String? title, required String description, ToastNotificationStyleType? style}) → void -
Displays a Toast message containing "Sorry" for the title, you
only need to provide a
description
. -
showToastSuccess(
{String? title, required String description, ToastNotificationStyleType? style}) → void -
Displays a Toast message containing "Success" for the title, you
only need to provide a
description
. -
showToastWarning(
{String? title, required String description, ToastNotificationStyleType? style}) → void -
Displays a Toast message containing "Warning" for the title, you
only need to provide a
description
. -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toSkeleton(
{Key? key, bool? ignoreContainers, bool? justifyMultiLineText, Color? containersColor, bool ignorePointers = true, bool enabled = true, PaintingEffect? effect, TextBoneBorderRadius? textBoneBorderRadius}) → Skeletonizer -
Available on Widget, provided by the NyWidget extension
Make a widget a skeleton using theSkeletonizer
package. -
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → 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
-
updatePageState(
String action, dynamic data) → void -
Updates the page state
Provide an
action
anddata
to call a method in the NyState. -
validate(
{required Map< String, dynamic> rules, Map<String, dynamic> ? data, Map<String, dynamic> messages = const {}, bool showAlert = true, Duration? alertDuration, ToastNotificationStyleType alertStyle = ToastNotificationStyleType.WARNING, required dynamic onSuccess()?, dynamic onFailure(Exception exception)?, String? lockRelease}) → void - Validate data from your widget.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited