validate method

Future<void> validate()

Implementation

Future<void> validate() async {
  List<bool> files = await Future.wait([
    checkFileExist(Constants.pubspecFilePath),
    checkFileExist(Constants.mainFilePath),
  ]);
  if (!files[0]) {
    throw CliException(
      message: "${Constants.pubspecFilePath.path} file is not exist",
    );
  }
  if (!files[1]) {
    throw CliException(
      message: "${Constants.mainFilePath.path} file is not exist",
    );
  }
}