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

View File

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