Tag: data-class
-
Flutter dataclass for GraphQL response – value can be another class or null
0 I am currently developing an app in Dart/Flutter and I am facing one issue with my data class to handle my GraphQL response. My User class is defined as following: import ‘package:json_annotation/json_annotation.dart’; import ‘/src/dataclasses/user_address.dart’; import ‘/src/dataclasses/user_birthdate.dart’; import ‘/src/dataclasses/user_legal_guardian.dart’; part ‘user.g.dart’; @JsonSerializable() class User { String? sub; String? email; String? username; List<dynamic>? roles; String? name;…