reorder file structure
This commit is contained in:
23
Frontend/lib/mih_components/mih_objects/session_st.dart
Normal file
23
Frontend/lib/mih_components/mih_objects/session_st.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class SessionST {
|
||||
final String status;
|
||||
final bool exists;
|
||||
|
||||
const SessionST({
|
||||
required this.status,
|
||||
required this.exists,
|
||||
});
|
||||
|
||||
factory SessionST.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
'status': String status,
|
||||
'exists': bool exists,
|
||||
} =>
|
||||
SessionST(
|
||||
status: status,
|
||||
exists: exists,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load SessionST.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user