NEW: MIH Home & Mzansi Profile Provider Setup pt 1
This commit is contained in:
parent
553d22dd6b
commit
d51603ff5d
28 changed files with 2687 additions and 2515 deletions
|
|
@ -37,7 +37,7 @@ class MihColors {
|
|||
if (darkMode == true) {
|
||||
return const Color(0xff8ae290);
|
||||
} else {
|
||||
return const Color(0xffB0F2B4);
|
||||
return const Color(0xFF41B349);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ class MihColors {
|
|||
return const Color(0xffd69d7d);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xffd69d7d);
|
||||
return const Color(0xFFBD7145);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ class MihColors {
|
|||
return const Color(0xff6e7dcc);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xff6e7dcc);
|
||||
return const Color(0xFF5567C0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ class MihColors {
|
|||
return const Color(0xffb682e7);
|
||||
} else {
|
||||
// Add a different shade of pink for light mode
|
||||
return const Color(0xffb682e7);
|
||||
return const Color(0xFF9857D4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_print_prevew
|
|||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_test.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/about_mih/about_mih.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/access_review/mih_access.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/calculator/mih_calculator.dart';
|
||||
|
|
@ -29,6 +30,7 @@ import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/a
|
|||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/components/full_screen_file.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/patient_edit.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/patient_profile.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:supertokens_flutter/supertokens.dart';
|
||||
|
||||
class MihGoRouterPaths {
|
||||
|
|
@ -133,16 +135,8 @@ class MihGoRouter {
|
|||
path: MihGoRouterPaths.mihHome,
|
||||
builder: (BuildContext context, GoRouterState state) {
|
||||
KenLogger.success("MihGoRouter: mihHome");
|
||||
if (state.extra != null) {
|
||||
final bool personalSelected = state.extra as bool;
|
||||
return MihHome(
|
||||
key: UniqueKey(),
|
||||
personalSelected: personalSelected,
|
||||
);
|
||||
}
|
||||
return MihHome(
|
||||
key: UniqueKey(),
|
||||
personalSelected: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
@ -166,15 +160,13 @@ class MihGoRouter {
|
|||
path: MihGoRouterPaths.mzansiProfileManage,
|
||||
builder: (BuildContext context, GoRouterState state) {
|
||||
KenLogger.success("MihGoRouter: mzansiProfileManage");
|
||||
final AppProfileUpdateArguments? args =
|
||||
state.extra as AppProfileUpdateArguments?;
|
||||
if (args == null) {
|
||||
if (context.watch<MzansiProfileProvider>().user == null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.go(MihGoRouterPaths.mihHome);
|
||||
});
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return MzansiProfile(arguments: args);
|
||||
return MzansiProfile();
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
|
|
@ -198,8 +190,7 @@ class MihGoRouter {
|
|||
path: MihGoRouterPaths.businessProfileManage,
|
||||
builder: (BuildContext context, GoRouterState state) {
|
||||
KenLogger.success("MihGoRouter: businessProfileManage");
|
||||
final BusinessArguments? args = state.extra as BusinessArguments?;
|
||||
if (args == null) {
|
||||
if (context.watch<MzansiProfileProvider>().business == null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.go(MihGoRouterPaths.mihHome);
|
||||
});
|
||||
|
|
@ -207,7 +198,6 @@ class MihGoRouter {
|
|||
}
|
||||
return MzansiBusinessProfile(
|
||||
key: UniqueKey(),
|
||||
arguments: args,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue