since Firebase was updated I have been having some issues, first it was because now, instead of a map, an Object? is returned and that is now fixed, but I can't seem to get any data from the database. I can put it there fine but the reading is not working.

This is on my firebase_utils .dart file

FirebaseDatabase data = FirebaseDatabase.instance;
DatabaseReference database = data.ref();
Future<void> init() async {

  FirebaseAuth.instance.userChanges().listen((user) {
    if (user != null) {
      //_loginState = ApplicationLoginState.loggedIn;
    } else {
      //_loginState = ApplicationLoginState.loggedOut;
    }
  });
  if (!kIsWeb) {
    data.setPersistenceEnabled(true);
    data.setPersistenceCacheSizeBytes(10000000);
  }

}

I have this class:

class ReservationStreamPublisher {

  Stream<List<Reservation>> getReservationStream() {

    final stream = database.child('reservations').onValue;
    final streamToPublish = stream
        .map((event) {
          List<Reservation> reservationList = [];
      Map<String, dynamic>.from(event.snapshot.value as dynamic)
      .forEach((key, value) => reservationList.add(Reservation.fromRTDB(value)));
      print(reservationList);
      return reservationList;
    });
    return streamToPublish;
  }
}

Next is my Reservation.fromRTDB

factory Reservation.fromRTDB(Map<String, dynamic> data) {
    return Reservation(
        pin: data['pin'],
        day: data['day'],
        hour: data['hour'],
        duration: data['duration'],
        state: data['state'],
        userEmail: data['client_email'],
        completed: data['completed'],
        id: data['id'],
        dateMade: '',
        timeMade: '');
  }

And this is one of the places where I am supposed to show data

Text('Slots Reservados neste dia:'),
                _selectedDate != null
                    ? StreamBuilder(
                        stream:
                            ReservationStreamPublisher().getReservationStream(),
                        builder: (context, snapshot) {
                          final tilesList = <ListTile>[];
                          if (snapshot.hasData) {
                            List reservations =
                                snapshot.data as List<Reservation>;
                            int i = 0;
                            do {
                              if (reservations.isNotEmpty) {
                                if (reservations[i].day !=
                                    (DateFormat('dd/MM/yyyy')
                                        .format(_selectedDate!))) {
                                  reservations.removeAt(i);
                                  i = i;
                                } else
                                  i++;
                              }
                            } while (i < reservations.length);
                            try {
                              tilesList
                                  .addAll(reservations.map((nextReservation) {
                                return ListTile(
                                  leading: Icon(Icons.lock_clock),
                                  title: Text(
                                      "Das ${nextReservation.hour}  as  ${nextReservation.duration}"),
                                );
                              }));
                            } catch (e) {
                              return Text(
                                  'Ainda nao existem reservas neste dia');
                            }
                          }
                          // }
                          if (tilesList.isNotEmpty) {
                            return Expanded(
                              child: ListView(
                                children: tilesList,
                              ),
                            );
                          }
                          return Text('Ainda nao existem reservas neste dia');
                        })
                    : SizedBox(),

I am not getting any error at the moment, but no data is returned.This is a Reservation example on my RTDB