Created
April 27, 2020 18:34
-
-
Save r3dm1ke/27c668dd2330d4460a849f5566c7ddf4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class Car { | |
| final String make; | |
| final String model; | |
| // Default constructor | |
| Car(this.make, this.model); | |
| Car.fromJson(Map<String, dynamic> json) | |
| : make = json['make'], | |
| model = json['model']; | |
| Map<String, dynamic> toJson() => | |
| { | |
| 'make': make, | |
| 'model': model | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment