Unable to implement firebase database new update ^9.0.12

My project worked fine with the version firebase_database: ^7.0.0 but with the newer release of firebase database I can’t update my project code.

Here is the working version for v7

class _MainScreenState extends State<MainScreen> {
//
 DatabaseReference driversRef =
      FirebaseDatabase(databaseURL: firebaseUrl).reference().child("Drivers");

//
void searchNearestDriver() {
    print("xxx searchNearestDriver");
    if (availableDrivers.length == 0) {
      cancelRideRequest();
      clear();
      noDriverFound();
      return;
    }
    var driver = availableDrivers[0];
    driversRef
        .child(driver.key!)
        .child('car_details')
        .child("type")
        .once()
        .then((DataSnapshot snap) async { //error from here
      if (await snap.value != null) {
        String carType = snap.value.toString();
        if (carType == carRideType) {
          notifyDriver(driver);
          //print("NotifyDriver is running");
          //TODO This removes the driver from geofire aswell re code

          //availableDrivers.removeAt(0);
        } else {
          Fluttertoast.showToast(msg: carRideType + "Driver not available");
        }
      }
    });
  }

The error I receive is on `(DataSnapShot snap) async ){…}
and the error is

The argument type 'Future<Null> Function(DataSnapshot)' can't be assigned to the parameter type 'FutureOr<dynamic>