TokenHandler<T extends Object>.storage constructor
TokenHandler<T extends Object>.storage ({})
Implementation
TokenHandler.storage({
required String key,
required Storage storage,
JsonObject Function(T value)? toJson,
required T Function(JsonObject json) fromJson,
required this.isTokenValid,
required this.authorize,
this.refreshToken,
this.errorShouldClearToken,
}) : _token = StorageMutableLiveData<T?>(
storage: StorageInterface.jsonObject(
key: key,
storage: storage,
toJson: toJson == null ? null : (value) => value == null ? null : toJson(value),
fromJson: (json) => fromJson(json),
),
);