ErrorHandlerFlutter class

A class to provide error Handeling functionality This uses Http as default Scheme and showSnackbar is default set to True When APi call through get method of this class and internet is not available , A sncakbar will appear on the screen Call init method of this class after Materialapp is Initialized and pass parameter to configure as per your choice

Constructors

ErrorHandlerFlutter.new()

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

init({bool? usehttp, bool? showSnackbar}) → void
by default it will use http and show snackbar
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

showSnackbar bool
default set to True
getter/setter pair
useHttp bool
default set to True
getter/setter pair

Static Methods

delete(String endpoint, {int timeout = 3, Map<String, dynamic>? queryPara, dynamic body, Map<String, String>? headers}) Future<Result>
Delete request
get(String endpoint, {int timeout = 3, Map<String, dynamic>? queryPara, Map<String, String>? headers}) Future<Result>
get request
mapDioResponseToResult(dynamic response) Result
map Dio response into Result
mapHttpResponseToResult(Response response) Result
map response into Result
post(String endpoint, {int timeout = 3, Map<String, dynamic>? queryPara, dynamic body, Map<String, String>? headers}) Future<Result>
POST request