import 'package:json_annotation/json_annotation.dart'; part 'user_model.g.dart'; @JsonSerializable() class UserModel { @JsonKey(name: 'user_id') final int? userId; final bool? profileCompleted; @JsonKey(name: 'access_token') final String? accessToken; @JsonKey(name: 'refresh_token') final String? refreshToken; const UserModel( {this.userId, this.accessToken, this.profileCompleted, this.refreshToken}); factory UserModel.fromJson(Map json) => _$UserModelFromJson(json); Map toJson() => _$UserModelToJson(this); }