Authorization class
- Annotations
-
- @JsonSerializable()
Constructors
- Authorization({required AuthorizationType type, required String token, required DateTime expiredAt, String? payload})
-
Creates a new Authorization instance.
const
- Authorization.access({required String token, required DateTime expiredAt, String? payload})
-
Create a AuthorizationType.access authorization instance.
factory
-
Authorization.fromJson(Map<
String, dynamic> json) -
Factory constructor for creating a new Authorization instance
factory
- Authorization.refresh({required String token, required DateTime expiredAt, String? payload})
-
Create a AuthorizationType.refresh authorization instance.
factory
Properties
Methods
-
copyWith(
{String? token, DateTime? expiredAt, String? payload}) → Authorization - Copy with new values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Create a JSON Object for this Authorization instance.
-
toString(
) → String -
To String.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited