30 lines
581 B
Dart
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,
|
|
);
|
|
}
|
|
}
|