Add register and sign up with supertokens
This commit is contained in:
@@ -2,28 +2,31 @@
|
||||
class AppUser {
|
||||
final int idusers;
|
||||
final String email;
|
||||
final int docOffice_id;
|
||||
final int docOffice_ID;
|
||||
final String fname;
|
||||
final String lname;
|
||||
final String title;
|
||||
final String app_id;
|
||||
|
||||
const AppUser(
|
||||
this.idusers,
|
||||
this.email,
|
||||
this.docOffice_id,
|
||||
this.docOffice_ID,
|
||||
this.fname,
|
||||
this.lname,
|
||||
this.title,
|
||||
this.app_id,
|
||||
);
|
||||
|
||||
factory AppUser.fromJson(dynamic json) {
|
||||
return AppUser(
|
||||
json['idusers'],
|
||||
json['email'],
|
||||
json['docOffice_id'],
|
||||
json['docOffice_ID'],
|
||||
json['fname'],
|
||||
json['lname'],
|
||||
json['title'],
|
||||
json['app_id'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
23
Frontend/patient_manager/lib/objects/sessionST.dart
Normal file
23
Frontend/patient_manager/lib/objects/sessionST.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