getAll method Null safety

Future<Response> getAll(
  1. dynamic table
)

Implementation

Future<Response> getAll(table) async {
  var db;
  if (_database == 'postgre') {
    var connection = PostgreSQLConnection(_host, _port, _db,
        username: _username, password: _password);
    await connection.open();
    db = Postgre().getAll(connection, table);
  } 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().getAll(connection, table);
  } else {}

  return db;
}