update mih app action type

This commit is contained in:
2025-03-26 13:00:00 +02:00
parent 8c47ab97b2
commit 7afe58437e

View File

@@ -1,13 +1,14 @@
import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_action.dart'; import 'package:Mzansi_Innovation_Hub/mih_packages/mih_home/components/mih_app_drawer.dart';
import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_tools.dart'; import 'package:Mzansi_Innovation_Hub/mih_components/mih_package/mih_app_tools.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// import 'package:flutter_swipe_detector/flutter_swipe_detector.dart'; // import 'package:flutter_swipe_detector/flutter_swipe_detector.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class MihApp extends StatefulWidget { class MihApp extends StatefulWidget {
final MihAppAction appActionButton; final Widget appActionButton;
final MihAppTools appTools; final MihAppTools appTools;
final List<Widget> appBody; final List<Widget> appBody;
final MIHAppDrawer? actionDrawer;
int selectedbodyIndex; int selectedbodyIndex;
final Function(int) onIndexChange; final Function(int) onIndexChange;
MihApp({ MihApp({
@@ -15,6 +16,7 @@ class MihApp extends StatefulWidget {
required this.appActionButton, required this.appActionButton,
required this.appTools, required this.appTools,
required this.appBody, required this.appBody,
this.actionDrawer,
required this.selectedbodyIndex, required this.selectedbodyIndex,
required this.onIndexChange, required this.onIndexChange,
}); });
@@ -54,6 +56,7 @@ class _MihAppState extends State<MihApp> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
Size screenSize = MediaQuery.of(context).size; Size screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
drawer: widget.actionDrawer,
body: SafeArea( body: SafeArea(
child: Container( child: Container(
width: screenSize.width, width: screenSize.width,