push ordenar por timestamp

This commit is contained in:
Felipe
2023-10-30 14:43:14 -05:00
parent 6d8f83bc66
commit f3879a912c
7 changed files with 79 additions and 67 deletions
+4
View File
@@ -65,6 +65,7 @@ Future<List<Event>> getByProId(String day) async {
.where('professional_id', isEqualTo: uid)
.where('day', isEqualTo: day.toString())
.where('status', isEqualTo: 'aprobado')
.orderBy('Timestamp', descending: true)
.get();
List<Event> eventos = [];
@@ -141,6 +142,7 @@ class Event {
int? tarifa;
bool professionalScored;
bool userScored;
Timestamp? timeStamp;
Event({
this.id,
@@ -156,6 +158,7 @@ class Event {
this.longitud,
this.latitud,
this.status = 'pendiente',
this.timeStamp,
this.tarifa,
this.professionalScored = false,
this.userScored = false,
@@ -176,6 +179,7 @@ class Event {
longitud: json['longitude'] ?? 0,
latitud: json['latitude'] ?? 0,
status: json['status'],
timeStamp: json['Timestamp'] ?? 0,
tarifa: json['tarifa'] ?? 0,
professionalScored: json['professional_scored'],
userScored: json['user_scored'],