Skip to content

Instantly share code, notes, and snippets.

@alperefesahin
Created January 7, 2023 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alperefesahin/5c0e3fed1aaa23ea489380ec956aba89 to your computer and use it in GitHub Desktop.
Save alperefesahin/5c0e3fed1aaa23ea489380ec956aba89 to your computer and use it in GitHub Desktop.
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