add param of selected index to preselect page
This commit is contained in:
@@ -7,14 +7,26 @@ import 'package:Mzansi_Innovation_Hub/mih_packages/about_mih/app_tools/mih_terms
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AboutMih extends StatefulWidget {
|
class AboutMih extends StatefulWidget {
|
||||||
const AboutMih({super.key});
|
final int packageIndex;
|
||||||
|
const AboutMih({
|
||||||
|
super.key,
|
||||||
|
required this.packageIndex,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AboutMih> createState() => _AboutMihState();
|
State<AboutMih> createState() => _AboutMihState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AboutMihState extends State<AboutMih> {
|
class _AboutMihState extends State<AboutMih> {
|
||||||
int _selcetedIndex = 0;
|
late int _selcetedIndex;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
setState(() {
|
||||||
|
_selcetedIndex = widget.packageIndex;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user