You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
835 B

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<String, dynamic> json) =>
_$LoginInfoFromJson(json);
const LoginInfo({
required this.token,
required this.user,
});
@override
List<Object?> 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<String, dynamic> json) => _$UserFromJson(json);
@override
List<Object?> get props =>
[
id,
name,
];
}