import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; part 'user_info_model.g.dart'; @JsonSerializable() class UserInfoModel extends Equatable { final String inviteCode; final String nickname; final String headImg; final int gender; final String phone; final int level; factory UserInfoModel.fromJson(Map json) => _$UserInfoModelFromJson(json); Map toJson() => _$UserInfoModelToJson(this); const UserInfoModel({ required this.inviteCode, required this.nickname, required this.headImg, required this.gender, required this.phone, required this.level, }); @override List get props => [ inviteCode, nickname, headImg, gender, phone, level, ]; }