import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; part 'login_info_model.g.dart'; @JsonSerializable() class LoginInfo extends Equatable { final String token; final User user; factory LoginInfo.fromJson(Map json) => _$LoginInfoFromJson(json); const LoginInfo({ required this.token, required this.user, }); @override List get props => [token, user]; } @JsonSerializable() class User extends Equatable { final int id; final String name; const User({ required this.id, required this.name, }); factory User.fromJson(Map json) => _$UserFromJson(json); @override List get props => [id, name]; }