import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; part 'courier.g.dart'; @JsonSerializable() class Courier extends Equatable { factory Courier.fromJson(final Map json) => _$CourierFromJson(json); Courier({ required this.name, required this.surname, required this.id, required this.phone, }); final String name; final String surname; final String phone; final int id; // tojson Map toJson() => _$CourierToJson(this); @override List get props => [ name, surname, phone, id, ]; }