updateId static method

bool updateId(
  1. String id,
  2. String platform
)

Implementation

static bool updateId(String id, String platform) {
  if (platform == 'android') {
    if (!_Validator.isValidAndroid) {
      stdout.writeln(
        "This directory doesn't seem to be a valid Flutter Android project."
            .withColor(red),
      );
      return false;
    }
    _AndroidConfigs.setAppId(id);
    return true;
  } else if (platform == 'ios') {
    if (!_Validator.isValidIos) {
      stdout.writeln(
        "This directory doesn't seem to be a valid Flutter iOS project."
            .withColor(red),
      );
      return false;
    }
    _IosConfigs.setAppId(id);
    return true;
  }
  return false;
}