Coffee class

A utility class named Coffee to manage global configurations and initialize storage.

This class holds a base endpoint URL and a function to convert JSON to a model object. It also initializes GetStorage when init is called.

Constructors

Coffee()

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 Methods

getAuthSettings() AuthSettings?
getBaseUrl() String
getUserModelFromJson<T extends CoffeeModel>() → T Function(Map<String, dynamic>)
handleUnauthorizedError() → void
init({required String baseUrl, required dynamic userModelFromJson(Map<String, dynamic>), Function? onUnauthorizedCallback, AuthSettings? auth}) Future<void>
Initializes the Coffee class.