Co-authored-by: MENDOZA BALLARDO GAEL RICARDO <gael-meb123@users.noreply.github.com> Co-authored-by: Azareth-Tr <Azareth-Tr@users.noreply.github.com> modificacion de vistas panel admin, login, animaciones y implementacion de mascota
32 lines
813 B
Dart
32 lines
813 B
Dart
class AdminDriverModel {
|
|
final String id;
|
|
final String userId;
|
|
final String? userName;
|
|
final String? userEmail;
|
|
final int? unitId;
|
|
final String? plate;
|
|
|
|
const AdminDriverModel({
|
|
required this.id,
|
|
required this.userId,
|
|
this.userName,
|
|
this.userEmail,
|
|
this.unitId,
|
|
this.plate,
|
|
});
|
|
|
|
factory AdminDriverModel.fromJson(Map<String, dynamic> json) =>
|
|
AdminDriverModel(
|
|
id: json['id'].toString(),
|
|
userId: json['user_id'].toString(),
|
|
userName: json['user_name'] as String?,
|
|
userEmail: json['user_email'] as String?,
|
|
unitId: (json['unit_id'] as num?)?.toInt(),
|
|
plate: json['plate'] as String?,
|
|
);
|
|
|
|
String get displayName => userName == null || userName!.trim().isEmpty
|
|
? (userEmail ?? userId)
|
|
: userName!;
|
|
}
|