added guardian login with views for their assigned childs
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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,
|
||||
}) = _GuardianChild;
|
||||
|
||||
factory GuardianChild.fromJson(Map<String, Object?> json) =>
|
||||
_$GuardianChildFromJson(json);
|
||||
|
||||
String get displayName => '$firstName $lastName'.trim();
|
||||
}
|
||||
Reference in New Issue
Block a user