Created
January 7, 2023 13:30
-
-
Save FlutterWiz/5c0e3fed1aaa23ea489380ec956aba89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part 'chat_user_model.freezed.dart'; | |
part 'chat_user_model.g.dart'; | |
@freezed | |
class ChatUserModel with _$ChatUserModel { | |
const factory ChatUserModel({ | |
required String createdAt, | |
required String userRole, | |
required bool isUserBanned, | |
}) = _ChatUserModel; | |
const ChatUserModel._(); | |
factory ChatUserModel.empty() => const ChatUserModel( | |
createdAt: "", | |
userRole: "", | |
isUserBanned: false, | |
); | |
factory ChatUserModel.fromJson(Map<String, dynamic> json) => _$ChatUserModelFromJson(json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment