execute method

  1. @override
void execute(
  1. List<String> arguments
)
override

Implementation

@override
void execute(List<String> arguments) async {
  stdout.writeln('\x1B[32m Database seed started \x1B[0m');
  Process process = await Process.start(
    'dart',
    [
      'run',
      '${Directory.current.path}/lib/database/seeders/database_seeder.dart'
    ],
  );

  await for (var data in process.stdout.transform(utf8.decoder)) {
    List lines = data.split("\n");
    for (String line in lines) {
      if (line.isNotEmpty) {
        stdout.writeln(line);
      }
    }
  }
}