applyToFlutter function

Future<void> applyToFlutter({
  1. required List<String> repos,
  2. required bool omitFlag,
  3. required bool watch,
  4. required String pattern,
})

Implementation

Future<void> applyToFlutter({
  required List<String> repos,
  required bool omitFlag,
  required bool watch,
  required String pattern,
}) async {
  try {
    await for (final directory in getPubDirectories()) {
      _logger.config('Found Pub Dir: ${directory.path}');
      await scanAndChangeRepos(
        repos: repos,
        workingDirectory: directory.absolute.path,
        omitFlag: omitFlag,
        pattern: pattern,
        watch: watch,
      ).onError(
        (error, stackTrace) => _logger.severe(error),
      );
    }
  } on Exception catch (e, st) {
    _logger.shout(e, e, st);
  }
}