saveUserInfo method
Saves the userData to the configuration file.
Takes a userData as a parameter and writes it to the configuration file.
Throws an UnsupportedError if the platform is not supported.
Implementation
Future<void> saveUserInfo({required Map<String, dynamic> userData}) async {
final file = await File(_getConfigFilePath()).create(recursive: true);
final yamlEditor = YamlEditor('')..update([], userData);
// write the new YAML file into a new file
file.writeAsStringSync(yamlEditor.toString());
}