run method

  1. @override
void run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
void run() {
  try {
    Logger.normal(updateMessage);
    //EXTRACT THE DATA FROM THE HTML AND MANIFEST FILES.
    ExtensionDetails extensionDetails = getExtractedData();
    //GET THE EXTENSION DETAILS FROM THE USER.
    extensionDetails = getExtensionDetails(details: extensionDetails);
    //MANIPULATE THE HTML FILE.
    htmlManipulation(extensionDetails: extensionDetails);
    //MANIPULATE THE MANIFEST FILE.
    manifestManipulation(extensionDetails: extensionDetails);

    Logger.normal(updateEndMessage);

    Logger.success(
        "\n🛠️  to build the extension run: flutter pub run extension_enabler build\n");
  } catch (e) {
    Logger.error("❌ ${e.toString()}");
  }

  //todo
  // bool isIcon = argResults!.arguments.toList().contains("--icon");
}