show which icon is selected
This commit is contained in:
@@ -132,40 +132,126 @@ class _PatientViewState extends State<PatientView> {
|
|||||||
return MIHHeader(
|
return MIHHeader(
|
||||||
headerAlignment: MainAxisAlignment.end,
|
headerAlignment: MainAxisAlignment.end,
|
||||||
headerItems: [
|
headerItems: [
|
||||||
IconButton(
|
Visibility(
|
||||||
onPressed: () {
|
visible: _selectedIndex != 0,
|
||||||
setState(() {
|
child: IconButton(
|
||||||
_selectedIndex = 0;
|
onPressed: () {
|
||||||
});
|
setState(() {
|
||||||
},
|
_selectedIndex = 0;
|
||||||
icon: const Icon(
|
});
|
||||||
Icons.perm_identity,
|
},
|
||||||
size: 35,
|
icon: const Icon(
|
||||||
|
Icons.perm_identity,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
Visibility(
|
||||||
onPressed: () {
|
visible: _selectedIndex == 0,
|
||||||
setState(() {
|
child: IconButton.filled(
|
||||||
_selectedIndex = 1;
|
iconSize: 35,
|
||||||
});
|
onPressed: () {
|
||||||
},
|
setState(() {
|
||||||
icon: const Icon(
|
_selectedIndex = 0;
|
||||||
Icons.article_outlined,
|
});
|
||||||
size: 35,
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.perm_identity,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
Visibility(
|
||||||
onPressed: () {
|
visible: _selectedIndex != 1,
|
||||||
setState(() {
|
child: IconButton(
|
||||||
_selectedIndex = 2;
|
onPressed: () {
|
||||||
});
|
setState(() {
|
||||||
},
|
_selectedIndex = 1;
|
||||||
icon: const Icon(
|
});
|
||||||
Icons.file_present,
|
},
|
||||||
size: 35,
|
icon: const Icon(
|
||||||
|
Icons.article_outlined,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: _selectedIndex == 1,
|
||||||
|
child: IconButton.filled(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = 1;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.article_outlined,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: _selectedIndex != 2,
|
||||||
|
child: IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = 2;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.file_present,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: _selectedIndex == 2,
|
||||||
|
child: IconButton.filled(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = 2;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.file_present,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
// headerItems: [
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// setState(() {
|
||||||
|
// _selectedIndex = 0;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// icon: const Icon(
|
||||||
|
// Icons.perm_identity,
|
||||||
|
// size: 35,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// setState(() {
|
||||||
|
// _selectedIndex = 1;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// icon: const Icon(
|
||||||
|
// Icons.article_outlined,
|
||||||
|
// size: 35,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// setState(() {
|
||||||
|
// _selectedIndex = 2;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// icon: const Icon(
|
||||||
|
// Icons.file_present,
|
||||||
|
// size: 35,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user