add personalSelected to widgets
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
|
|
||||||
Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).popAndPushNamed(
|
||||||
'/',
|
'/',
|
||||||
|
arguments: true,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user