From 95e3351c52371bd9eaf78f779baccc20612fe5aa Mon Sep 17 00:00:00 2001 From: Anas Fikhi Date: Mon, 18 Dec 2023 20:40:48 +0100 Subject: [PATCH] [ Edit ] applied Dart fix and format.. --- .../config_command/sub_commands/create_command.dart | 3 ++- lib/src/commands/debug_info/debug_info.dart | 6 +++--- lib/src/commands/start_command/start_command.dart | 2 +- lib/src/etc/controllers/yaml.dart | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/src/commands/config_command/sub_commands/create_command.dart b/lib/src/commands/config_command/sub_commands/create_command.dart index 2fc44bb..b8078bb 100644 --- a/lib/src/commands/config_command/sub_commands/create_command.dart +++ b/lib/src/commands/config_command/sub_commands/create_command.dart @@ -57,7 +57,8 @@ class ConfigCreateCommand extends Command { return await _requestToOverwrite(file, configFileController); } else { return await _promptForConfigFileControllerCreation( - configFileController); + configFileController, + ); } } catch (e) { logger.err(e.toString()); diff --git a/lib/src/commands/debug_info/debug_info.dart b/lib/src/commands/debug_info/debug_info.dart index 50caa4e..a1ea590 100644 --- a/lib/src/commands/debug_info/debug_info.dart +++ b/lib/src/commands/debug_info/debug_info.dart @@ -9,12 +9,12 @@ import 'package:mason_logger/mason_logger.dart'; /// A command to show some useful info while debugging, this command is made for devlopemnet and it should not appear on production version /// {@endtemplate} class DebugInfoCommand extends Command { - /// The logger to use. - final Logger logger; - /// {@macro debug_info_command} DebugInfoCommand({required this.logger}); + /// The logger to use. + final Logger logger; + @override String get description => 'show some useful info while debugging, this command is made for devlopemnet and it should not appear on production version'; diff --git a/lib/src/commands/start_command/start_command.dart b/lib/src/commands/start_command/start_command.dart index da77e73..7045402 100644 --- a/lib/src/commands/start_command/start_command.dart +++ b/lib/src/commands/start_command/start_command.dart @@ -295,8 +295,8 @@ class StartCommand extends Command { /// Ensures that the API key is saved in the local database, and that it exists. int? _ensureApiKeyExists({ - String? apiKey, required Progress configFilesValidationProgress, + String? apiKey, }) { if (apiKey == null) { configFilesValidationProgress.fail( diff --git a/lib/src/etc/controllers/yaml.dart b/lib/src/etc/controllers/yaml.dart index d54dc48..e215721 100644 --- a/lib/src/etc/controllers/yaml.dart +++ b/lib/src/etc/controllers/yaml.dart @@ -22,7 +22,7 @@ class YamlController extends ConfigFileController { /// Writes the new [config] to the config file. @override - void writeNewConfig(Map config) async { + Future writeNewConfig(Map config) async { super.writeToConfigFileController('langsync:\n'); return _iterateAndWriteToConfigFileController(config); }