import 'package:freezed_annotation/freezed_annotation.dart'; part 'guardian_child.freezed.dart'; part 'guardian_child.g.dart'; /// A student linked to the signed-in guardian. [id] is an opaque server id, /// not a WebUntis id. @freezed abstract class GuardianChild with _$GuardianChild { const GuardianChild._(); const factory GuardianChild({ required String id, required String firstName, required String lastName, @Default('') String className, /// Login of the child, also its Nextcloud id (avatar). Null on servers /// that do not send it yet. String? username, }) = _GuardianChild; factory GuardianChild.fromJson(Map json) => _$GuardianChildFromJson(json); String get displayName => '$firstName $lastName'.trim(); }