getOption method Null safety

Future<Response> getOption(
  1. dynamic table,
  2. {dynamic column = '*',
  3. List? where}
)

Implementation

Future<Response> getOption(table, {column = '*', List? where}) async {
  var db;

  if (_database == 'postgre') {
    var connection = PostgreSQLConnection(_host, _port, _db,
        username: _username, password: _password);
    await connection.open();
    db = await Postgre()
        .getOption(connection, table, column: column, where: where);
  } else if (_database == 'mysql') {
    final connection = await MySQLConnection.createConnection(
      host: _host,
      port: _port,
      userName: _username,
      password: _password,
      databaseName: _db, // optional
    );

    await connection.connect();
    db = await MySql()
        .getOption(connection, table, column: column, where: where!);
  } else {}

  return db;
}