-
-
Save marcossevilla/c4656972050f915d3781d6e6cb24e862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:json_annotation/json_annotation.dart'; | |
import 'package:meta/meta.dart'; | |
import 'store_item_equatable.dart'; | |
part 'store_item_model.g.dart'; | |
@JsonSerializable(nullable: false) | |
class StoreItemModel extends StoreItemEquatable { | |
StoreItemModel({ | |
@required int id, | |
@required String name, | |
}) : super(id: id, name: name); | |
factory StoreItemModel.fromJson(Map<String, dynamic> json) { | |
return _$StoreItemModelFromJson(json); | |
} | |
Map<String, dynamic> toJson() => _$StoreItemModelToJson(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment