add padding param to body and update packages
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -487,6 +487,7 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class MihPrivacyPolicy extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class MIHTermsOfService extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,6 +238,7 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getPatientSearch(),
|
bodyItem: getPatientSearch(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ class _MyPatientListState extends State<MyPatientList> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: myPatientListTool(),
|
bodyItem: myPatientListTool(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ class _PatientInfoState extends State<PatientInfo> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
|
innerHorizontalPadding: 10,
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user