Aplikacja_mobilna/cookbook/lib/data/models/firebase_auth_user_model.dart
2024-02-18 14:30:02 +01:00

30 lines
581 B
Dart

import 'package:cookbook/domain/entities/auth_user.dart';
class FirebaseAuthUserModel {
String displayName;
String email;
String uid;
FirebaseAuthUserModel({
required this.displayName,
required this.email,
required this.uid,
});
factory FirebaseAuthUserModel.fromJson(Map<String, dynamic> json) {
return FirebaseAuthUserModel(
displayName: json['displayName'],
email: json['email'],
uid: json['uid'],
);
}
AuthUser toEntity() {
return AuthUser(
name: displayName,
email: email,
uid: uid,
);
}
}