mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-30 06:56:10 +00:00
Serialization auto
This commit is contained in:
parent
5ec93124ec
commit
bd650ae609
7 changed files with 1261 additions and 71 deletions
16
aidedejeu_flutter/lib/models/test.dart
Normal file
16
aidedejeu_flutter/lib/models/test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'test.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class Test {
|
||||
String id;
|
||||
String rootId;
|
||||
String parentLink;
|
||||
String name;
|
||||
|
||||
Test();
|
||||
|
||||
factory Test.fromJson(Map<String, dynamic> map) => _$TestFromJson(map);
|
||||
Map<String, dynamic> toJson() => _$TestToJson(this);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue