loadConfig method

  1. @override
Future<UserToken> loadConfig()
override

Abstract method to load the configuration data.

Implementations should read the configuration file and return the configuration data as an object of type T.

Implementation

@override
Future<UserToken> loadConfig() async {
  var f = await resolveConfigFile();

  var contents = f.readAsStringSync();

  return UserToken.fromJson(jsonDecode(contents));
}