RouterHelper class
An util Class managing when and how authenticated http client to redirect login or under maintenance route if needed.
Constructors
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
-
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
Static Properties
- maintenanceCode ↔ int?
-
setter for maintenanceCode which decide when http client
need to redirect to under maintenance route.
Note: maintenanceCode can not be
0
, which is reserved for SUCCESS.getter/setter pair - unAuthCode ↔ dynamic
-
setter for unAuthCode which decide when http client need
to redirect to login route.
Note: unAuthCode can not be
0
, which is reserved for SUCCESS.getter/setter pair - unAuthStatusCode → dynamic
-
no setter
Static Methods
-
init(
{required Function jump2LoginCallback, dynamic unAuthCode, int? maintenanceCode, Function? jump2UnderMaintenanceCallback}) → void - initialize function
-
unAuth(
{int? code, int? statusCode}) → void - Redirect to login route when code or statusCode met.
-
underMaintenance(
{int? code}) → void - Redirect to under maintenance route when code met.