Merge pull request #186 from yaso-meth/QOL--Tool-Titles-in-package
QOL--Tool-Titles-in-package
This commit is contained in:
@@ -117,12 +117,21 @@ class _PackageTestState extends State<PackageTest> {
|
|||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Tool One",
|
||||||
|
"Tool Two",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackage(
|
return MihPackage(
|
||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class MihPackage extends StatefulWidget {
|
|||||||
final Widget appActionButton;
|
final Widget appActionButton;
|
||||||
final MihPackageTools appTools;
|
final MihPackageTools appTools;
|
||||||
final List<Widget> appBody;
|
final List<Widget> appBody;
|
||||||
|
final List<String>? appToolTitles;
|
||||||
final MIHAppDrawer? actionDrawer;
|
final MIHAppDrawer? actionDrawer;
|
||||||
int selectedbodyIndex;
|
int selectedbodyIndex;
|
||||||
final Function(int) onIndexChange;
|
final Function(int) onIndexChange;
|
||||||
@@ -17,6 +18,7 @@ class MihPackage extends StatefulWidget {
|
|||||||
required this.appActionButton,
|
required this.appActionButton,
|
||||||
required this.appTools,
|
required this.appTools,
|
||||||
required this.appBody,
|
required this.appBody,
|
||||||
|
this.appToolTitles,
|
||||||
this.actionDrawer,
|
this.actionDrawer,
|
||||||
required this.selectedbodyIndex,
|
required this.selectedbodyIndex,
|
||||||
required this.onIndexChange,
|
required this.onIndexChange,
|
||||||
@@ -112,10 +114,31 @@ class _MihPackageState extends State<MihPackage>
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
widget.appActionButton,
|
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),
|
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],
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// )),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ import 'package:flutter/material.dart';
|
|||||||
class MihPackageToolBody extends StatefulWidget {
|
class MihPackageToolBody extends StatefulWidget {
|
||||||
final bool borderOn;
|
final bool borderOn;
|
||||||
final Widget bodyItem;
|
final Widget bodyItem;
|
||||||
|
final double? innerHorizontalPadding;
|
||||||
const MihPackageToolBody({
|
const MihPackageToolBody({
|
||||||
super.key,
|
super.key,
|
||||||
required this.borderOn,
|
required this.borderOn,
|
||||||
required this.bodyItem,
|
required this.bodyItem,
|
||||||
|
this.innerHorizontalPadding,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -19,16 +21,16 @@ class _MihPackageToolBodyState extends State<MihPackageToolBody> {
|
|||||||
double getHorizontalPaddingSize(Size screenSize) {
|
double getHorizontalPaddingSize(Size screenSize) {
|
||||||
if (MzanziInnovationHub.of(context)!.theme.screenType == "desktop") {
|
if (MzanziInnovationHub.of(context)!.theme.screenType == "desktop") {
|
||||||
if (widget.borderOn) {
|
if (widget.borderOn) {
|
||||||
return 10;
|
return widget.innerHorizontalPadding ?? 10;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return widget.innerHorizontalPadding ?? 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// mobile
|
// mobile
|
||||||
if (widget.borderOn) {
|
if (widget.borderOn) {
|
||||||
return 10;
|
return widget.innerHorizontalPadding ?? 10;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return widget.innerHorizontalPadding ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class _AboutMihState extends State<AboutMih> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -93,4 +94,14 @@ class _AboutMihState extends State<AboutMih> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"About",
|
||||||
|
"Privacy Policy",
|
||||||
|
"Terms of Service",
|
||||||
|
"Attributes",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,17 +35,6 @@ class PolicyAndTermsText {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
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 ===============
|
//=============== Effective Date ===============
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 1250,
|
width: 1250,
|
||||||
@@ -445,17 +434,6 @@ class PolicyAndTermsText {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
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 ===============
|
//=============== Effective Date ===============
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 1250,
|
width: 1250,
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -110,22 +111,11 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
Icon(
|
Icon(
|
||||||
MihIcons.mihLogo,
|
MihIcons.mihLogo,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
size: 125,
|
size: 165,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
const Text(
|
|
||||||
'Attributions',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 30,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.0),
|
|
||||||
child: Divider(),
|
|
||||||
),
|
|
||||||
SelectableText(
|
SelectableText(
|
||||||
message,
|
message,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|||||||
@@ -486,7 +486,8 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -620,8 +621,8 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.share,
|
icon: Icons.share,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ class MihPrivacyPolicy extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ class MIHTermsOfService extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class _MihAccessState extends State<MihAccess> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -66,4 +67,11 @@ class _MihAccessState extends State<MihAccess> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Access",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,14 +131,6 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
|
|||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
|
||||||
"Access List",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 25,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
@@ -245,7 +237,8 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class _MIHCalculatorState extends State<MIHCalculator> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selectedIndex,
|
selectedbodyIndex: _selectedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -71,4 +72,12 @@ class _MIHCalculatorState extends State<MIHCalculator> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Simple Calculator",
|
||||||
|
"Tip Calculator",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ class _SimpleCalcState extends State<SimpleCalc> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -96,18 +97,6 @@ class _SimpleCalcState extends State<SimpleCalc> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
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(
|
Container(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
|
|||||||
@@ -263,7 +263,8 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -273,18 +274,6 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: <Widget>[
|
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(
|
MIHNumberField(
|
||||||
controller: billAmountController,
|
controller: billAmountController,
|
||||||
hintText: "Bill Amount",
|
hintText: "Bill Amount",
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class _MzansiCalendarState extends State<MzansiCalendar> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -72,4 +73,11 @@ class _MzansiCalendarState extends State<MzansiCalendar> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
widget.arguments.personalSelected == true ? "Personal" : "Business",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,13 +253,6 @@ class _PatientAccessRequestState extends State<Appointments> {
|
|||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
|
||||||
getTitle(),
|
|
||||||
style: const TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 25,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MIHCalendar(
|
MIHCalendar(
|
||||||
calendarWidth: 500,
|
calendarWidth: 500,
|
||||||
rowHeight: 35,
|
rowHeight: 35,
|
||||||
@@ -306,8 +299,8 @@ class _PatientAccessRequestState extends State<Appointments> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
@@ -370,7 +363,7 @@ class _PatientAccessRequestState extends State<Appointments> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,12 +72,21 @@ class _MihHomeState extends State<MihHome> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Personal",
|
||||||
|
"Business",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackage(
|
return MihPackage(
|
||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
actionDrawer: getActionDrawer(),
|
actionDrawer: getActionDrawer(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
|
|||||||
@@ -199,54 +199,6 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
|||||||
@@ -244,54 +244,6 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
|||||||
@@ -51,6 +51,13 @@ class _MzansiAiState extends State<MzansiAi> {
|
|||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Ask Mzansi",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@@ -62,6 +69,7 @@ class _MzansiAiState extends State<MzansiAi> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -610,55 +610,6 @@ class _AiChatState extends State<AiChat> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
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(),
|
_getSettings(),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -709,8 +660,8 @@ class _AiChatState extends State<AiChat> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 70,
|
bottom: 80,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -145,4 +146,14 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Profile",
|
||||||
|
"User",
|
||||||
|
"Team",
|
||||||
|
"Add Member",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,7 +234,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -243,15 +244,6 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
|
||||||
"Business Details",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 25,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Divider(color: MzanziInnovationHub.of(context)?.theme.secondaryColor()),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihCircleAvatar(
|
MihCircleAvatar(
|
||||||
imageFile: widget.logoImage,
|
imageFile: widget.logoImage,
|
||||||
width: 150,
|
width: 150,
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -109,14 +110,6 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
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(
|
MIHSearchField(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
hintText: "Username or Email Search",
|
hintText: "Username or Email Search",
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -83,15 +83,6 @@ class _MihMyBusinessTeamState extends State<MihMyBusinessTeam> {
|
|||||||
Widget getBody() {
|
Widget getBody() {
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
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(
|
FutureBuilder(
|
||||||
future: employeeList,
|
future: employeeList,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -215,16 +216,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
MihCircleAvatar(
|
||||||
imageFile: widget.userProPicImage,
|
imageFile: widget.userProPicImage,
|
||||||
width: 150,
|
width: 150,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class _MzansiProfileState extends State<MzansiProfile> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -74,4 +75,12 @@ class _MzansiProfileState extends State<MzansiProfile> {
|
|||||||
));
|
));
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Profile",
|
||||||
|
"Settings",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,8 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ class MihPersonalSettings extends StatefulWidget {
|
|||||||
class _MihPersonalSettingsState extends State<MihPersonalSettings> {
|
class _MihPersonalSettingsState extends State<MihPersonalSettings> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(borderOn: true, bodyItem: getBody());
|
return MihPackageToolBody(
|
||||||
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
|
bodyItem: getBody(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void deleteAccountPopUp(BuildContext ctxtd) {
|
void deleteAccountPopUp(BuildContext ctxtd) {
|
||||||
@@ -106,19 +110,6 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
|
|||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
Center(
|
||||||
child: FaIcon(
|
child: FaIcon(
|
||||||
FontAwesomeIcons.trashCan,
|
FontAwesomeIcons.trashCan,
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class _MihWalletState extends State<MihWallet> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -87,4 +88,12 @@ class _MihWalletState extends State<MihWallet> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Cards",
|
||||||
|
"Favourites",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
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_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_layout/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -45,25 +44,6 @@ class _MihCardFavouritesState extends State<MihCardFavourites> {
|
|||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
FutureBuilder(
|
||||||
future: cardList,
|
future: cardList,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ class _MihCardsState extends State<MihCards> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -279,23 +279,6 @@ class _MihCardsState extends State<MihCards> {
|
|||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
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(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -358,8 +341,8 @@ class _MihCardsState extends State<MihCards> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -54,14 +54,6 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
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(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@@ -222,7 +214,8 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getPatientSearch(),
|
bodyItem: getPatientSearch(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,28 +55,28 @@ class _MyPatientListState extends State<MyPatientList> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
child: Column(mainAxisSize: MainAxisSize.max, children: [
|
||||||
Row(
|
// Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
const Text(
|
// const Text(
|
||||||
"My Patient List",
|
// "My Patient List",
|
||||||
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
|
// style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
|
||||||
),
|
// ),
|
||||||
IconButton(
|
// IconButton(
|
||||||
iconSize: 20,
|
// iconSize: 20,
|
||||||
icon: const Icon(
|
// icon: const Icon(
|
||||||
Icons.refresh,
|
// Icons.refresh,
|
||||||
),
|
// ),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
getMyPatientList();
|
// getMyPatientList();
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
Divider(
|
// Divider(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
||||||
//spacer
|
// //spacer
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@@ -202,7 +202,8 @@ class _MyPatientListState extends State<MyPatientList> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: myPatientListTool(),
|
bodyItem: myPatientListTool(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,13 +67,6 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
|
||||||
"Waiting Room",
|
|
||||||
style: const TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 25,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MIHCalendar(
|
MIHCalendar(
|
||||||
calendarWidth: 500,
|
calendarWidth: 500,
|
||||||
rowHeight: 35,
|
rowHeight: 35,
|
||||||
@@ -122,8 +115,8 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
@@ -466,7 +459,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBusinessAppointmentsTool(),
|
bodyItem: getBusinessAppointmentsTool(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class _PatManagerState extends State<PatManager> {
|
|||||||
appActionButton: getActionButton(),
|
appActionButton: getActionButton(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -108,4 +109,13 @@ class _PatManagerState extends State<PatManager> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Waiting Room",
|
||||||
|
"Patients",
|
||||||
|
"Search Patients",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class _PatientClaimOrStatementState extends State<PatientClaimOrStatement> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -176,8 +176,8 @@ class _PatientClaimOrStatementState extends State<PatientClaimOrStatement> {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: widget.type != "personal",
|
visible: widget.type != "personal",
|
||||||
child: Positioned(
|
child: Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.file_copy,
|
icon: Icons.file_copy,
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -340,26 +340,6 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
final notesList = snapshot.data!;
|
final notesList = snapshot.data!;
|
||||||
return Column(children: [
|
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(
|
BuildNotesList(
|
||||||
notes: notesList,
|
notes: notesList,
|
||||||
signedInUser: widget.signedInUser,
|
signedInUser: widget.signedInUser,
|
||||||
@@ -380,8 +360,8 @@ class _PatientConsultationState extends State<PatientConsultation> {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: widget.type != "personal",
|
visible: widget.type != "personal",
|
||||||
child: Positioned(
|
child: Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
|
|||||||
@@ -394,8 +394,8 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||||||
Widget getMenu() {
|
Widget getMenu() {
|
||||||
if (widget.type == "personal") {
|
if (widget.type == "personal") {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
@@ -604,7 +604,7 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -623,27 +623,6 @@ class _PatientDocumentsState extends State<PatientDocuments> {
|
|||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
final filesList = snapshot.data!;
|
final filesList = snapshot.data!;
|
||||||
return Column(children: [
|
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(
|
BuildFilesList(
|
||||||
files: filesList,
|
files: filesList,
|
||||||
signedInUser: widget.signedInUser,
|
signedInUser: widget.signedInUser,
|
||||||
|
|||||||
@@ -233,7 +233,8 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: true,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -260,9 +261,6 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
Divider(
|
|
||||||
color:
|
|
||||||
MzanziInnovationHub.of(context)!.theme.secondaryColor()),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
getPatientDetailsField(),
|
getPatientDetailsField(),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -287,8 +285,8 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: widget.type == "personal",
|
visible: widget.type == "personal",
|
||||||
child: Positioned(
|
child: Positioned(
|
||||||
right: 0,
|
right: 10,
|
||||||
bottom: 0,
|
bottom: 10,
|
||||||
child: MihFloatingMenu(
|
child: MihFloatingMenu(
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
animatedIcon: AnimatedIcons.menu_close,
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class _PatientProfileState extends State<PatientProfile> {
|
|||||||
appActionButton: getAction(),
|
appActionButton: getAction(),
|
||||||
appTools: getTools(),
|
appTools: getTools(),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(),
|
||||||
|
appToolTitles: getToolTitle(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex: _selcetedIndex,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -109,4 +110,14 @@ class _PatientProfileState extends State<PatientProfile> {
|
|||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> getToolTitle() {
|
||||||
|
List<String> toolTitles = [
|
||||||
|
"Details",
|
||||||
|
"Notes",
|
||||||
|
"Documents",
|
||||||
|
"Claims",
|
||||||
|
];
|
||||||
|
return toolTitles;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user