add personalSelected to widgets

This commit is contained in:
2024-11-07 14:41:11 +02:00
parent a61a5d2064
commit 06cb232a09
2 changed files with 10 additions and 3 deletions

View File

@@ -6,7 +6,11 @@ import 'package:patient_manager/mih_packages/mih_home/mih_profile_getter.dart';
import 'package:supertokens_flutter/supertokens.dart';
class AuthCheck extends StatefulWidget {
const AuthCheck({super.key});
final bool personalSelected;
const AuthCheck({
super.key,
required this.personalSelected,
});
@override
State<AuthCheck> createState() => _AuthCheckState();
@@ -37,11 +41,13 @@ class _AuthCheckState extends State<AuthCheck> {
builder: (context, snapshot) {
//print(snapshot.data);
if (snapshot.data == true) {
return const MIHProfileGetter();
return MIHProfileGetter(
personalSelected: widget.personalSelected,
);
} else if (snapshot.data == false) {
return const SignInOrRegister();
} else {
return const SizedBox(width: 5,height: 5);
return const SizedBox(width: 5, height: 5);
//const Mihloadingcircle();
}
});

View File

@@ -243,6 +243,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
Navigator.of(context).popAndPushNamed(
'/',
arguments: true,
);
},
);