main function

void main(
  1. List<String> args
)

Implementation

void main(List<String> args) async {
  try {
    if (args[0] == 'help') {
      print('Arthur CLI \n');
      print('Available commands -');
      print(
          '"arthur createmodel <sqlite/postgres>" : To create model using "model_definition.yaml" file');
    } else if (args[0] == 'createmodel' && args[1] == 'postgres' ||
        args[1] == 'postgresql') {
      createMOdel('postgres');
    } else if (args[0] == 'createmodel' && args[1] == 'sqlite') {
      createMOdel('sqlite');
    } else {
      print('Arthur CLI \n');
      print('[ INFO ] Unknown command!!');
      print('[ INFO ] Use "arthur help" for showing available commands');
    }
  } on RangeError {
    print('Arthur CLI \n');
    print('[ INFO ] Use "arthur help" for showing available commands');
  }
}