import 'package:json_annotation/json_annotation.dart'; part 'login_request.g.dart'; @JsonSerializable() class LoginRequest { String phone; String password; LoginRequest({ required this.phone, required this.password, }); Map toJson() => _$LoginRequestToJson(this); factory LoginRequest.fromJson(Map json) => _$LoginRequestFromJson(json); }