Add scroll bar to mih

This commit is contained in:
Yasien Mac Mini 2026-02-16 15:23:16 +02:00
parent f8a722eb50
commit 103ccdc022
28 changed files with 205 additions and 168 deletions

View file

@ -161,6 +161,7 @@ class _PackageToolOneState extends State<PackageToolOne> {
return Stack(
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -111,6 +111,7 @@ class _PackageToolThreeState extends State<PackageToolThree> {
return Stack(
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [

View file

@ -24,6 +24,7 @@ class _PackageToolTwoState extends State<PackageToolTwo> {
Widget getBody() {
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,

View file

@ -25,6 +25,7 @@ class _PackageToolZeroState extends State<PackageToolZero> {
Widget getBody() {
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [

View file

@ -197,7 +197,10 @@ class _MihPackageWindowState extends State<MihPackageWindow> {
maxHeight: windowHeight * 0.85,
maxWidth: windowWidth * 0.85,
),
child: MihSingleChildScroll(child: widget.windowBody),
child: MihSingleChildScroll(
scrollbarOn: true,
child: widget.windowBody,
),
),
),
),

View file

@ -290,6 +290,7 @@ class _CurrencyExchangeRateState extends State<CurrencyExchangeRate> {
return Consumer<MihCalculatorProvider>(
builder: (context, calculatorProvider, child) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -94,6 +94,7 @@ class _SimpleCalcState extends State<SimpleCalc> {
}
}
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,

View file

@ -259,6 +259,7 @@ class _TipCalcState extends State<TipCalc> {
Widget getBody(double width) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: MzansiInnovationHub.of(context)!.theme.screenType == "desktop"
? EdgeInsets.symmetric(horizontal: width * 0.2)

View file

@ -5,6 +5,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_text_form_field.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
@ -139,9 +140,8 @@ class _MihForgotPasswordState extends State<MihForgotPassword> {
validateInput();
}
},
child: SafeArea(
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
child: MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: MzansiInnovationHub.of(context)!.theme.screenType ==
"desktop"
@ -177,11 +177,9 @@ class _MihForgotPasswordState extends State<MihForgotPassword> {
formFields: [
MihTextFormField(
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: emailController,
multiLineInput: false,
requiredText: true,
@ -224,7 +222,6 @@ class _MihForgotPasswordState extends State<MihForgotPassword> {
),
),
),
),
);
}
}

View file

@ -205,6 +205,7 @@ class _MihRegisterState extends State<MihRegister> {
}
},
child: MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -5,6 +5,7 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_text_form_field.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
@ -104,9 +105,8 @@ class _MihResetPasswordState extends State<MihResetPassword> {
}
}
},
child: SafeArea(
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
child: MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"
@ -142,11 +142,9 @@ class _MihResetPasswordState extends State<MihResetPassword> {
formFields: [
MihTextFormField(
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: passwordController,
multiLineInput: false,
requiredText: true,
@ -161,11 +159,9 @@ class _MihResetPasswordState extends State<MihResetPassword> {
const SizedBox(height: 10),
MihTextFormField(
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inputColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
controller: confirmPasswordController,
multiLineInput: false,
requiredText: true,
@ -210,7 +206,6 @@ class _MihResetPasswordState extends State<MihResetPassword> {
),
),
),
),
);
}
}

View file

@ -202,6 +202,7 @@ class _MihSignInState extends State<MihSignIn> {
}
},
child: MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -626,6 +626,7 @@ class _MineSweeperGameState extends State<MineSweeperGame> {
alignment: Alignment.topCenter,
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: board.isEmpty && squaresLeft < 0
// Start Up Message before setting up game
? Padding(

View file

@ -845,6 +845,7 @@ class _MineSweeperQuickStartGuideState
Widget getBody(double width) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: width / 20),
child: Column(

View file

@ -28,6 +28,7 @@ class _MihContactsState extends State<MihContacts> {
Widget getBody(double width) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Padding(

View file

@ -330,6 +330,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
} else if (directoryProvider.searchedBusinesses.isEmpty &&
directoryProvider.searchTerm.isNotEmpty) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
const SizedBox(height: 50),
@ -357,6 +358,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
} else if (directoryProvider.searchedBusinesses.isEmpty &&
directoryProvider.searchTerm.isEmpty) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
@ -472,6 +474,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
} else if (directoryProvider.searchedUsers.isEmpty &&
directoryProvider.searchTerm.isEmpty) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
@ -533,6 +536,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
} else if (directoryProvider.searchedUsers.isEmpty &&
directoryProvider.searchTerm.isNotEmpty) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
const SizedBox(height: 50),

View file

@ -316,6 +316,7 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
]
: null,
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: MzansiInnovationHub.of(context)!.theme.screenType ==
"desktop"

View file

@ -251,6 +251,7 @@ class _MihUpdateBusinessDetailsWindowState
context.pop();
},
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -127,6 +127,7 @@ class _MihUpdateMyBusinessUserDetailsState
builder: (BuildContext context,
MzansiProfileProvider mzansiProfileProvider, Widget? child) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -60,6 +60,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
return Stack(
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: MzansiInnovationHub.of(context)!.theme.screenType ==
"desktop"

View file

@ -58,6 +58,7 @@ class _MihBusinessDetailsViewState extends State<MihBusinessDetailsView> {
return Stack(
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: MzansiInnovationHub.of(context)!.theme.screenType ==
"desktop"

View file

@ -367,6 +367,7 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
alignment: Alignment.topCenter,
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: Padding(

View file

@ -175,6 +175,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
return Stack(
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding: MzansiInnovationHub.of(context)!.theme.screenType ==
"desktop"

View file

@ -146,6 +146,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
);
} else {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -54,6 +54,7 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
builder: (BuildContext context, MzansiDirectoryProvider directoryProvider,
Widget? child) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Padding(
padding:
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"

View file

@ -81,6 +81,7 @@ class _MihPersonalSettingsState extends State<MihPersonalSettings> {
Widget getBody(MzansiProfileProvider mzansiProfileProvider) {
return MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Center(

View file

@ -306,6 +306,7 @@ class _PatientInfoState extends State<PatientInfo> {
return Stack(
children: [
MihSingleChildScroll(
scrollbarOn: true,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [

View file

@ -32,6 +32,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -109,6 +110,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -186,6 +188,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -298,6 +301,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -416,6 +420,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -493,6 +498,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -594,6 +600,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -671,6 +678,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -748,6 +756,7 @@ class MihAlertServices {
backgroundColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -830,6 +839,7 @@ class MihAlertServices {
backgroundColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -900,6 +910,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -1007,6 +1018,7 @@ class MihAlertServices {
backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -1089,6 +1101,7 @@ class MihAlertServices {
backgroundColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -1159,6 +1172,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(
@ -1244,6 +1258,7 @@ class MihAlertServices {
backgroundColor: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
windowBody: MihSingleChildScroll(
scrollbarOn: true,
child: Column(
children: [
Icon(