getToken method
Retrieves the token from the configuration file.
Returns the token as a String.
Throws a TokenNotFoundException if the token is not found in the configuration file.
Implementation
String getToken() {
try {
final file = File(_getConfigFilePath());
final doc = loadYaml(file.readAsStringSync()) as Map;
return doc['token'] as String;
} catch (e) {
throw TokenNotFoundException(
msg: 'Token not found check our docs: ${Env.docs} for more info',
);
}
}