read method
Get saved oauth2.Credentials
or null when none could be found.
Implementation
@override
Future<Credentials?> read() async {
final json = await _storage.read(key: _key);
if (json == null) {
return null;
}
try {
return Credentials.fromJson(json);
} on FormatException {
return null;
}
}