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() {
  if (!_Validator.isPubspecValid) {
    stdout.writeln(
        'This directory doesn\'t seem to be a valid Flutter project.'
            .makeError);
    return;
  } else if (!_Validator.isAndroidManifestValid) {
    stdout.writeln(
        'Your Flutter project doesn\'t have a valid AndroidManifest.xml file.'
            .makeError);
    return;
  } else if (!_Validator.isGradleValid) {
    stdout.writeln(
        'Your Flutter android project doesn\'t have a valid build.gradle file.'
            .makeError);
    return;
  }

  _UpdateHelper.checkIfUpdateAvailable().then((_) {
    _androidSign(); // Calls your existing signing logic
  });
}