diff --git a/Frontend/ios/Podfile.lock b/Frontend/ios/Podfile.lock index 24e85542..d47ae8e1 100644 --- a/Frontend/ios/Podfile.lock +++ b/Frontend/ios/Podfile.lock @@ -96,13 +96,9 @@ PODS: - nanopb/encode (= 3.30910.0) - nanopb/decode (3.30910.0) - nanopb/encode (3.30910.0) - - "no_screenshot (0.0.1+4)": - - Flutter - - ScreenProtectorKit (~> 1.3.1) - printing (1.0.0): - Flutter - PromisesObjC (2.4.0) - - ScreenProtectorKit (1.3.1) - SDWebImage (5.20.0): - SDWebImage/Core (= 5.20.0) - SDWebImage/Core (5.20.0) @@ -128,7 +124,6 @@ DEPENDENCIES: - geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`) - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) - - no_screenshot (from `.symlinks/plugins/no_screenshot/ios`) - printing (from `.symlinks/plugins/printing/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`) @@ -150,7 +145,6 @@ SPEC REPOS: - MLKitVision - nanopb - PromisesObjC - - ScreenProtectorKit - SDWebImage - SwiftyGif @@ -173,8 +167,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/local_auth_darwin/darwin" mobile_scanner: :path: ".symlinks/plugins/mobile_scanner/ios" - no_screenshot: - :path: ".symlinks/plugins/no_screenshot/ios" printing: :path: ".symlinks/plugins/printing/ios" shared_preferences_foundation: @@ -208,10 +200,8 @@ SPEC CHECKSUMS: MLKitVision: 45e79d68845a2de77e2dd4d7f07947f0ed157b0e mobile_scanner: af8f71879eaba2bbcb4d86c6a462c3c0e7f23036 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 - no_screenshot: 6d183496405a3ab709a67a54e5cd0f639e94729e printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 - ScreenProtectorKit: 83a6281b02c7a5902ee6eac4f5045f674e902ae4 SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 diff --git a/Frontend/lib/mih_components/mih_package_components/mih_app.dart b/Frontend/lib/mih_components/mih_package_components/mih_app.dart index 3f2e71aa..01cda197 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_app.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_app.dart @@ -28,6 +28,10 @@ class MihApp extends StatefulWidget { class _MihAppState extends State { late PageController _pageController; + void unfocusAll() { + FocusScope.of(context).unfocus(); + } + @override void dispose() { super.dispose(); @@ -55,69 +59,72 @@ class _MihAppState extends State { @override Widget build(BuildContext context) { Size screenSize = MediaQuery.of(context).size; - return Scaffold( - drawer: widget.actionDrawer, - body: SafeArea( - child: Container( - width: screenSize.width, - height: screenSize.height, - //color: Colors.black, - padding: const EdgeInsets.only(top: 5), - child: Column( - children: [ - Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - widget.appActionButton, - Flexible(child: widget.appTools), - ], - ), - Expanded( - child: PageView.builder( - controller: _pageController, - itemCount: widget.appBody.length, - itemBuilder: (context, index) { - return widget.appBody[index]; - }, - onPageChanged: (index) { - setState(() { - widget.selectedbodyIndex = index; - widget.onIndexChange(widget.selectedbodyIndex); - }); - }, + return GestureDetector( + onTap: unfocusAll, + child: Scaffold( + drawer: widget.actionDrawer, + body: SafeArea( + child: Container( + width: screenSize.width, + height: screenSize.height, + //color: Colors.black, + padding: const EdgeInsets.only(top: 5), + child: Column( + children: [ + Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + widget.appActionButton, + Flexible(child: widget.appTools), + ], ), - ), - // 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], - // ) - // ], - // ), - // )), - ], + Expanded( + child: PageView.builder( + controller: _pageController, + itemCount: widget.appBody.length, + itemBuilder: (context, index) { + return widget.appBody[index]; + }, + onPageChanged: (index) { + setState(() { + widget.selectedbodyIndex = index; + widget.onIndexChange(widget.selectedbodyIndex); + }); + }, + ), + ), + // 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], + // ) + // ], + // ), + // )), + ], + ), ), ), ), diff --git a/Frontend/lib/mih_packages/about_mih/about_mih.dart b/Frontend/lib/mih_packages/about_mih/about_mih.dart index 127b2d56..0df84fa6 100644 --- a/Frontend/lib/mih_packages/about_mih/about_mih.dart +++ b/Frontend/lib/mih_packages/about_mih/about_mih.dart @@ -50,6 +50,7 @@ class _AboutMihState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/access_review/mih_access.dart b/Frontend/lib/mih_packages/access_review/mih_access.dart index 32e861f6..0b77a6c6 100644 --- a/Frontend/lib/mih_packages/access_review/mih_access.dart +++ b/Frontend/lib/mih_packages/access_review/mih_access.dart @@ -40,6 +40,7 @@ class _MihAccessState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/calculator/mih_calculator.dart b/Frontend/lib/mih_packages/calculator/mih_calculator.dart index a09f7bba..d4b843e0 100644 --- a/Frontend/lib/mih_packages/calculator/mih_calculator.dart +++ b/Frontend/lib/mih_packages/calculator/mih_calculator.dart @@ -41,6 +41,7 @@ class _MIHCalculatorState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/calendar/mzansi_calendar.dart b/Frontend/lib/mih_packages/calendar/mzansi_calendar.dart index 21e62779..e175f310 100644 --- a/Frontend/lib/mih_packages/calendar/mzansi_calendar.dart +++ b/Frontend/lib/mih_packages/calendar/mzansi_calendar.dart @@ -41,6 +41,7 @@ class _MzansiCalendarState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/mzansi_ai/mzansi_ai.dart b/Frontend/lib/mih_packages/mzansi_ai/mzansi_ai.dart index 00190ad9..04e10302 100644 --- a/Frontend/lib/mih_packages/mzansi_ai/mzansi_ai.dart +++ b/Frontend/lib/mih_packages/mzansi_ai/mzansi_ai.dart @@ -25,6 +25,7 @@ class _MzansiAiState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/mzansi_business_profile.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/mzansi_business_profile.dart index 8dd3df7d..776be5d5 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/mzansi_business_profile.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/mzansi_business_profile.dart @@ -41,6 +41,7 @@ class _MzansiBusinessProfileState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart index 062d9858..21d31012 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart @@ -41,6 +41,7 @@ class _MzansiProfileState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/mzansi_wallet/mih_wallet.dart b/Frontend/lib/mih_packages/mzansi_wallet/mih_wallet.dart index 985a32ff..9709ccae 100644 --- a/Frontend/lib/mih_packages/mzansi_wallet/mih_wallet.dart +++ b/Frontend/lib/mih_packages/mzansi_wallet/mih_wallet.dart @@ -49,6 +49,7 @@ class _MihWalletState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/pat_manager.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/pat_manager.dart index 37f05ee8..abf6a9ef 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/pat_manager.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/pat_manager.dart @@ -48,6 +48,7 @@ class _PatManagerState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); } diff --git a/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_profile.dart b/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_profile.dart index eaf509e6..420314b1 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_profile.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_profile.dart @@ -42,6 +42,7 @@ class _PatientProfileState extends State { iconSize: 35, onTap: () { Navigator.of(context).pop(); + FocusScope.of(context).unfocus(); }, ); }