generate method
Implementation
Future<void> generate() {
List<Future<void>> futures = [];
if (config.createConfigClass) {
futures.add(_generateClass());
}
if (config.createDotEnv) {
futures.add(_generateDotEnv());
}
if (futures.isEmpty) {
throw ValidationError(ConfigFieldType.FIELDS,
'At least one field should be defined for `.env` or Dart config class');
}
return Future.wait(futures);
}