NetworkManagerMetaData class
A Network Manager.
Constructors
- NetworkManagerMetaData()
-
factory
Properties
- dioOption ↔ BaseOptions
-
getter/setter pair
- errorMsgExtractor ↔ String Function(dynamic error)
-
a function to extract error as string
getter/setter pair
- failedDialog ↔ (Future Function(BuildContext? context, String title, String body)?)
-
getter/setter pair
- globalCancelToken ↔ CancelToken?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- onEndDefault ↔ Function
-
called on End every request
getter/setter pair
- onFailedDefault ↔ Function
-
called on Failed every request
getter/setter pair
- onStartDefault ↔ Function
-
have several http functions
called on start every request
getter/setter pair
- onSuccessDefault ↔ Function
-
called on Success every request
getter/setter pair
- onTokenExpire ↔ void Function(void retryFunctoin())
-
called on token expire
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- successDialog ↔ (Future Function(BuildContext? context, String title, String body)?)
-
getter/setter pair
- successMsgExtractor ↔ (String Function(dynamic msg)?)
-
getter/setter pair
- successRules ↔ bool Function(dynamic responseJson)
-
other rules for check beside result code 200 should be a function return bool value
getter/setter pair
- token ↔ String?
-
String token which is used in header
getter/setter pair
- tokenExpireRules ↔ bool Function(dynamic responseJson)
-
conditions where token expires
getter/setter pair
- useFancyDialog ↔ bool
-
getter/setter pair
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 Methods
-
initialize(
{String? baseUrl, Duration timeout = const Duration(milliseconds: 15000), String? token, Function? onStartDefault, Function? onEndDefault, Function? onSuccessDefault, Function? onFailedDefault, CancelToken? globalCancelToken, bool useFancyDialog = false, Map< String, dynamic> ? headers, bool successRules(dynamic responseJson)?, bool tokenExpireRules(dynamic responseJson)?, required Future successDialog(BuildContext? context, String title, String body), required Future failedDialog(BuildContext? context, String title, String body), void onTokenExpire(void retryFunctoin())?, String errorMsgExtractor(dynamic error)?, String successMsgExtractor(dynamic msg)?}) → dynamic -
setAccessToken(
String token) → dynamic