add param of selected index to preselect page

This commit is contained in:
2025-03-06 10:55:16 +02:00
parent e1ac4923c9
commit 166c13faf3

View File

@@ -7,14 +7,26 @@ import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/app_tools/mih_terms
import 'package:flutter/material.dart';
class AboutMih extends StatefulWidget {
const AboutMih({super.key});
final int packageIndex;
const AboutMih({
super.key,
required this.packageIndex,
});
@override
State<AboutMih> createState() => _AboutMihState();
}
class _AboutMihState extends State<AboutMih> {
int _selcetedIndex = 0;
late int _selcetedIndex;
@override
void initState() {
super.initState();
setState(() {
_selcetedIndex = widget.packageIndex;
});
}
@override
Widget build(BuildContext context) {