saveConfig method

  1. @override
Future<void> saveConfig(
  1. UserToken config
)
override

Abstract method to save the configuration data.

Implementations should serialize the configuration data of type T and write it to the configuration file.

  • config: The configuration data to save.

Implementation

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

  return f.writeAsStringSync(jsonEncode(config.toJson()));
}