User constructor

User({
  1. required String id,
  2. required String name,
  3. @Default(18) int age = 18,
  4. List<String> tags = const [],
  5. required Set<int> scores,
  6. Map<String, String> metadata = const {'role' : 'user'},
  7. Set<String> tagsSet = const {'a', 'b'},
  8. Map<String, int> stats = const {'count' : 1},
})

Implementation

User({
  required this.id,
  required this.name,
  @Default(18) this.age = 18,
  this.tags = const [],
  required this.scores,
  this.metadata = const {'role': 'user'},
  this.tagsSet = const {'a', 'b'},
  this.stats = const {'count': 1},
});