Merge pull request #186 from yaso-meth/QOL--Tool-Titles-in-package

QOL--Tool-Titles-in-package
This commit is contained in:
yaso-meth
2025-05-29 16:53:43 +02:00
committed by GitHub
41 changed files with 225 additions and 461 deletions

View File

@@ -117,12 +117,21 @@ class _PackageTestState extends State<PackageTest> {
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Tool One",
"Tool Two",
];
return toolTitles;
}
@override
Widget build(BuildContext context) {
return MihPackage(
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {

View File

@@ -9,6 +9,7 @@ class MihPackage extends StatefulWidget {
final Widget appActionButton;
final MihPackageTools appTools;
final List<Widget> appBody;
final List<String>? appToolTitles;
final MIHAppDrawer? actionDrawer;
int selectedbodyIndex;
final Function(int) onIndexChange;
@@ -17,6 +18,7 @@ class MihPackage extends StatefulWidget {
required this.appActionButton,
required this.appTools,
required this.appBody,
this.appToolTitles,
this.actionDrawer,
required this.selectedbodyIndex,
required this.onIndexChange,
@@ -112,10 +114,31 @@ class _MihPackageState extends State<MihPackage>
children: [
Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
widget.appActionButton,
Flexible(child: widget.appTools),
Expanded(
child: Container(
alignment: Alignment.centerRight,
// color: Colors.black,
child: FittedBox(
child: Text(
widget.appToolTitles != null
? widget
.appToolTitles![widget.selectedbodyIndex]
: "",
style: const TextStyle(
fontSize: 23,
fontWeight: FontWeight.w600,
),
),
),
),
),
const SizedBox(
width: 5,
),
widget.appTools,
],
),
const SizedBox(height: 5),
@@ -134,35 +157,6 @@ class _MihPackageState extends State<MihPackage>
},
),
),
// Expanded(
// child: SwipeDetector(
// onSwipeLeft: (offset) {
// if (widget.selectedbodyIndex <
// widget.appTools.tools.length - 1) {
// setState(() {
// widget.selectedbodyIndex += 1;
// widget.onIndexChange(widget.selectedbodyIndex);
// });
// }
// // print("swipe left");
// },
// onSwipeRight: (offset) {
// if (widget.selectedbodyIndex > 0) {
// setState(() {
// widget.selectedbodyIndex -= 1;
// widget.onIndexChange(widget.selectedbodyIndex);
// });
// }
// // print("swipe right");
// },
// child: Row(
// children: [
// Expanded(
// child: widget.appBody[widget.selectedbodyIndex],
// )
// ],
// ),
// )),
],
),
),

View File

@@ -4,10 +4,12 @@ import 'package:flutter/material.dart';
class MihPackageToolBody extends StatefulWidget {
final bool borderOn;
final Widget bodyItem;
final double? innerHorizontalPadding;
const MihPackageToolBody({
super.key,
required this.borderOn,
required this.bodyItem,
this.innerHorizontalPadding,
});
@override
@@ -19,16 +21,16 @@ class _MihPackageToolBodyState extends State<MihPackageToolBody> {
double getHorizontalPaddingSize(Size screenSize) {
if (MzanziInnovationHub.of(context)!.theme.screenType == "desktop") {
if (widget.borderOn) {
return 10;
return widget.innerHorizontalPadding ?? 10;
} else {
return 0;
return widget.innerHorizontalPadding ?? 0;
}
} else {
// mobile
if (widget.borderOn) {
return 10;
return widget.innerHorizontalPadding ?? 10;
} else {
return 0;
return widget.innerHorizontalPadding ?? 0;
}
}
}

View File

@@ -35,6 +35,7 @@ class _AboutMihState extends State<AboutMih> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -93,4 +94,14 @@ class _AboutMihState extends State<AboutMih> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"About",
"Privacy Policy",
"Terms of Service",
"Attributes",
];
return toolTitles;
}
}

View File

@@ -35,17 +35,6 @@ class PolicyAndTermsText {
),
),
const SizedBox(height: 10),
const Text(
"Privacy Policy",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 30,
),
),
const Padding(
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Divider(),
),
//=============== Effective Date ===============
SizedBox(
width: 1250,
@@ -445,17 +434,6 @@ class PolicyAndTermsText {
const SizedBox(
height: 10,
),
const Text(
"Terms of Service",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 30,
),
),
const Padding(
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Divider(),
),
//=============== Effective Date ===============
SizedBox(
width: 1250,

View File

@@ -91,7 +91,8 @@ class _MihAttributesState extends State<MihAttributes> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -110,22 +111,11 @@ class _MihAttributesState extends State<MihAttributes> {
Icon(
MihIcons.mihLogo,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
size: 125,
size: 165,
),
const SizedBox(
height: 10,
),
const Text(
'Attributions',
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
),
),
const Padding(
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Divider(),
),
SelectableText(
message,
style: const TextStyle(

View File

@@ -486,7 +486,8 @@ class _MihInfoState extends State<MihInfo> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -620,8 +621,8 @@ class _MihInfoState extends State<MihInfo> {
),
),
Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.share,
children: [

View File

@@ -9,7 +9,8 @@ class MihPrivacyPolicy extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(context),
);
}

View File

@@ -9,7 +9,8 @@ class MIHTermsOfService extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(context),
);
}

View File

@@ -24,6 +24,7 @@ class _MihAccessState extends State<MihAccess> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -66,4 +67,11 @@ class _MihAccessState extends State<MihAccess> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Access",
];
return toolTitles;
}
}

View File

@@ -131,14 +131,6 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
return MihSingleChildScroll(
child: Column(
children: [
const Text(
"Access List",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
@@ -245,7 +237,8 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}

View File

@@ -25,6 +25,7 @@ class _MIHCalculatorState extends State<MIHCalculator> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selectedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -71,4 +72,12 @@ class _MIHCalculatorState extends State<MIHCalculator> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Simple Calculator",
"Tip Calculator",
];
return toolTitles;
}
}

View File

@@ -72,7 +72,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -96,18 +97,6 @@ class _SimpleCalcState extends State<SimpleCalc> {
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
"Simple Calculator",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(20),
alignment: Alignment.centerRight,

View File

@@ -263,7 +263,8 @@ class _TipCalcState extends State<TipCalc> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -273,18 +274,6 @@ class _TipCalcState extends State<TipCalc> {
child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(
"Tip Calculator",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
MIHNumberField(
controller: billAmountController,
hintText: "Bill Amount",

View File

@@ -25,6 +25,7 @@ class _MzansiCalendarState extends State<MzansiCalendar> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -72,4 +73,11 @@ class _MzansiCalendarState extends State<MzansiCalendar> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
widget.arguments.personalSelected == true ? "Personal" : "Business",
];
return toolTitles;
}
}

View File

@@ -253,13 +253,6 @@ class _PatientAccessRequestState extends State<Appointments> {
MihSingleChildScroll(
child: Column(
children: [
Text(
getTitle(),
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
MIHCalendar(
calendarWidth: 500,
rowHeight: 35,
@@ -306,8 +299,8 @@ class _PatientAccessRequestState extends State<Appointments> {
),
),
Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.add,
animatedIcon: AnimatedIcons.menu_close,
@@ -370,7 +363,7 @@ class _PatientAccessRequestState extends State<Appointments> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}

View File

@@ -72,12 +72,21 @@ class _MihHomeState extends State<MihHome> {
}
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Personal",
"Business",
];
return toolTitles;
}
@override
Widget build(BuildContext context) {
return MihPackage(
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
actionDrawer: getActionDrawer(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {

View File

@@ -199,54 +199,6 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
return MihSingleChildScroll(
child: Column(
children: [
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// color: MzanziInnovationHub.of(context)!.theme.errorColor(),
// ),
// height: 40,
// child: Row(
// children: [
// Icon(
// Icons.warning_amber_rounded,
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
// size: 40,
// ),
// const SizedBox(
// width: 5,
// ),
// Expanded(
// child: SingleChildScrollView(
// controller: _scrollController,
// scrollDirection: Axis.horizontal,
// child: Text(
// maintenanceMsg,
// style: TextStyle(
// color: MzanziInnovationHub.of(context)!
// .theme
// .primaryColor(),
// fontSize: 20,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ),
// ],
// ),
// ),
const SizedBox(
height: 5,
),
const Text(
"Business Home",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,

View File

@@ -244,54 +244,6 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
return MihSingleChildScroll(
child: Column(
children: [
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// color: MzanziInnovationHub.of(context)!.theme.errorColor(),
// ),
// height: 40,
// child: Row(
// children: [
// Icon(
// Icons.warning_amber_rounded,
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
// size: 40,
// ),
// const SizedBox(
// width: 5,
// ),
// Expanded(
// child: SingleChildScrollView(
// controller: _scrollController,
// scrollDirection: Axis.horizontal,
// child: Text(
// maintenanceMsg,
// style: TextStyle(
// color: MzanziInnovationHub.of(context)!
// .theme
// .primaryColor(),
// fontSize: 20,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ),
// ],
// ),
// ),
const SizedBox(
height: 5,
),
const Text(
"Personal Home",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,

View File

@@ -51,6 +51,13 @@ class _MzansiAiState extends State<MzansiAi> {
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Ask Mzansi",
];
return toolTitles;
}
@override
void initState() {
super.initState();
@@ -62,6 +69,7 @@ class _MzansiAiState extends State<MzansiAi> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {

View File

@@ -610,55 +610,6 @@ class _AiChatState extends State<AiChat> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Visibility(
// visible: _showModelOptions.value == true,
// child: IconButton.filled(
// iconSize: 20,
// onPressed: () {
// if (_showModelOptions.value == true) {
// setState(() {
// _showModelOptions.value = false;
// });
// } else {
// setState(() {
// _showModelOptions.value = true;
// });
// }
// },
// icon: const Icon(
// Icons.settings,
// ),
// ),
// ),
Expanded(
child: Text(
"Mzansi AI",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
),
),
),
// Expanded(
// child: Container(
// alignment: Alignment.centerRight,
// child: IconButton(
// onPressed: () {
// _resetChat();
// },
// icon: const Icon(Icons.refresh),
// ),
// ),
// ),
],
),
_getSettings(),
Expanded(
child: GestureDetector(
@@ -709,8 +660,8 @@ class _AiChatState extends State<AiChat> {
),
),
Positioned(
right: 0,
bottom: 70,
right: 10,
bottom: 80,
child: MihFloatingMenu(
animatedIcon: AnimatedIcons.menu_close,
children: [

View File

@@ -50,6 +50,7 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -145,4 +146,14 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Profile",
"User",
"Team",
"Add Member",
];
return toolTitles;
}
}

View File

@@ -234,7 +234,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(context),
);
}
@@ -243,15 +244,6 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
return MihSingleChildScroll(
child: Column(
children: [
const Text(
"Business Details",
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
Divider(color: MzanziInnovationHub.of(context)?.theme.secondaryColor()),
const SizedBox(height: 10),
MihCircleAvatar(
imageFile: widget.logoImage,
width: 150,

View File

@@ -92,7 +92,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -109,14 +110,6 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
}
},
child: Column(mainAxisSize: MainAxisSize.max, children: [
const Text(
"User Search",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
),
//spacer
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
MIHSearchField(
controller: searchController,
hintText: "Username or Email Search",

View File

@@ -75,7 +75,7 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}
@@ -83,15 +83,6 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
Widget getBody() {
return MihSingleChildScroll(
child: Column(mainAxisSize: MainAxisSize.max, children: [
const Text(
"Business Team",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
FutureBuilder(
future: employeeList,
builder: (context, snapshot) {

View File

@@ -206,7 +206,8 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -215,16 +216,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
return MihSingleChildScroll(
child: Column(
children: [
const Text(
"My Business User",
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
Divider(
color: MzanziInnovationHub.of(context)?.theme.secondaryColor()),
const SizedBox(height: 10),
MihCircleAvatar(
imageFile: widget.userProPicImage,
width: 150,

View File

@@ -26,6 +26,7 @@ class _MzansiProfileState extends State<MzansiProfile> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -74,4 +75,12 @@ class _MzansiProfileState extends State<MzansiProfile> {
));
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Profile",
"Settings",
];
return toolTitles;
}
}

View File

@@ -253,7 +253,8 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}

View File

@@ -22,7 +22,11 @@ class MihPersonalSettings extends StatefulWidget {
class _MihPersonalSettingsState extends State<MihPersonalSettings> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(borderOn: true, bodyItem: getBody());
return MihPackageToolBody(
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
void deleteAccountPopUp(BuildContext ctxtd) {
@@ -106,19 +110,6 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
return MihSingleChildScroll(
child: Column(
children: [
Text(
"Account Settings",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
const SizedBox(height: 10.0),
Center(
child: FaIcon(
FontAwesomeIcons.trashCan,

View File

@@ -36,6 +36,7 @@ class _MihWalletState extends State<MihWallet> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -87,4 +88,12 @@ class _MihWalletState extends State<MihWallet> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Cards",
"Favourites",
];
return toolTitles;
}
}

View File

@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_apis/mih_mzansi_wallet_apis.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
@@ -34,7 +33,7 @@ class _MihCardFavouritesState extends State<MihCardFavourites> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}
@@ -45,25 +44,6 @@ class _MihCardFavouritesState extends State<MihCardFavourites> {
MihSingleChildScroll(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Favourites",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
),
),
],
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),
FutureBuilder(
future: cardList,
builder: (context, snapshot) {

View File

@@ -268,7 +268,7 @@ class _MihCardsState extends State<MihCards> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}
@@ -279,23 +279,6 @@ class _MihCardsState extends State<MihCards> {
MihSingleChildScroll(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Loyalty Cards",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
),
),
],
),
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -358,8 +341,8 @@ class _MihCardsState extends State<MihCards> {
),
),
Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
animatedIcon: AnimatedIcons.menu_close,
children: [

View File

@@ -54,14 +54,6 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
}
},
child: Column(mainAxisSize: MainAxisSize.max, children: [
const Text(
"MIH Patient Lookup",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
//spacer
const SizedBox(height: 10),
Row(
mainAxisSize: MainAxisSize.min,
children: [
@@ -222,7 +214,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getPatientSearch(),
);
}

View File

@@ -55,28 +55,28 @@ class _MyPatientListState extends State<MyPatientList> {
}
},
child: Column(mainAxisSize: MainAxisSize.max, children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"My Patient List",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
),
IconButton(
iconSize: 20,
icon: const Icon(
Icons.refresh,
),
onPressed: () {
getMyPatientList();
},
),
],
),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
//spacer
const SizedBox(height: 10),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// const Text(
// "My Patient List",
// style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
// ),
// IconButton(
// iconSize: 20,
// icon: const Icon(
// Icons.refresh,
// ),
// onPressed: () {
// getMyPatientList();
// },
// ),
// ],
// ),
// Divider(
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
// //spacer
// const SizedBox(height: 10),
Row(
mainAxisSize: MainAxisSize.min,
children: [
@@ -202,7 +202,8 @@ class _MyPatientListState extends State<MyPatientList> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: myPatientListTool(),
);
}

View File

@@ -67,13 +67,6 @@ class _WaitingRoomState extends State<WaitingRoom> {
MihSingleChildScroll(
child: Column(
children: [
const Text(
"Waiting Room",
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
MIHCalendar(
calendarWidth: 500,
rowHeight: 35,
@@ -122,8 +115,8 @@ class _WaitingRoomState extends State<WaitingRoom> {
),
),
Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.add,
animatedIcon: AnimatedIcons.menu_close,
@@ -466,7 +459,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBusinessAppointmentsTool(),
);
}

View File

@@ -33,6 +33,7 @@ class _PatManagerState extends State<PatManager> {
appActionButton: getActionButton(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -108,4 +109,13 @@ class _PatManagerState extends State<PatManager> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Waiting Room",
"Patients",
"Search Patients",
];
return toolTitles;
}
}

View File

@@ -114,7 +114,7 @@ class _PatientClaimOrStatementState extends State<PatientClaimOrStatement> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}
@@ -176,8 +176,8 @@ class _PatientClaimOrStatementState extends State<PatientClaimOrStatement> {
Visibility(
visible: widget.type != "personal",
child: Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.file_copy,
animatedIcon: AnimatedIcons.menu_close,

View File

@@ -321,7 +321,7 @@ class _PatientConsultationState extends State<PatientConsultation> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}
@@ -340,26 +340,6 @@ class _PatientConsultationState extends State<PatientConsultation> {
} else if (snapshot.hasData) {
final notesList = snapshot.data!;
return Column(children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Consultation Notes",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor()),
),
],
),
Divider(
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor()),
const SizedBox(height: 10),
BuildNotesList(
notes: notesList,
signedInUser: widget.signedInUser,
@@ -380,8 +360,8 @@ class _PatientConsultationState extends State<PatientConsultation> {
Visibility(
visible: widget.type != "personal",
child: Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.add,
animatedIcon: AnimatedIcons.menu_close,

View File

@@ -394,8 +394,8 @@ class _PatientDocumentsState extends State<PatientDocuments> {
Widget getMenu() {
if (widget.type == "personal") {
return Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.add,
animatedIcon: AnimatedIcons.menu_close,
@@ -604,7 +604,7 @@ class _PatientDocumentsState extends State<PatientDocuments> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
bodyItem: getBody(),
);
}
@@ -623,27 +623,6 @@ class _PatientDocumentsState extends State<PatientDocuments> {
} else if (snapshot.hasData) {
final filesList = snapshot.data!;
return Column(children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Documents",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
),
),
],
),
Divider(
color: MzanziInnovationHub.of(context)!
.theme
.secondaryColor()),
const SizedBox(height: 10),
BuildFilesList(
files: filesList,
signedInUser: widget.signedInUser,

View File

@@ -233,7 +233,8 @@ class _PatientInfoState extends State<PatientInfo> {
@override
Widget build(BuildContext context) {
return MihPackageToolBody(
borderOn: true,
borderOn: false,
innerHorizontalPadding: 10,
bodyItem: getBody(),
);
}
@@ -260,9 +261,6 @@ class _PatientInfoState extends State<PatientInfo> {
),
),
]),
Divider(
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
const SizedBox(height: 10),
getPatientDetailsField(),
const SizedBox(height: 10),
@@ -287,8 +285,8 @@ class _PatientInfoState extends State<PatientInfo> {
Visibility(
visible: widget.type == "personal",
child: Positioned(
right: 0,
bottom: 0,
right: 10,
bottom: 10,
child: MihFloatingMenu(
icon: Icons.add,
animatedIcon: AnimatedIcons.menu_close,

View File

@@ -27,6 +27,7 @@ class _PatientProfileState extends State<PatientProfile> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {
@@ -109,4 +110,14 @@ class _PatientProfileState extends State<PatientProfile> {
];
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Details",
"Notes",
"Documents",
"Claims",
];
return toolTitles;
}
}