MpRouter class

Lightweight router facade used by Mp JSON actions.

Constructors

MpRouter({required MpRouterScreenHandler push, required MpRouterScreenHandler replace, required MpRouterScreenHandler reset, required MpRouterResultHandler pop, required MpRouterResultHandler popToRoot, required MpRouterPopToScreenHandler popToScreen})
Creates a router facade over the active mini-program stack.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
pop → MpRouterResultHandler
Pops the current screen and returns result to the revealed screen.
final
popToRoot → MpRouterResultHandler
Pops to the root screen and returns result.
final
popToScreen → MpRouterPopToScreenHandler
Pops to screenId and returns result.
final
push → MpRouterPopToScreenHandler
Pushes screenId and exposes params under {{route.*}}.
final
replace → MpRouterPopToScreenHandler
Replaces the current screen with screenId.
final
reset → MpRouterPopToScreenHandler
Resets the stack to screenId.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited