show which icon is selected
This commit is contained in:
parent
8f62eba084
commit
70b4b430a7
1 changed files with 113 additions and 27 deletions
|
|
@ -132,7 +132,9 @@ class _PatientViewState extends State<PatientView> {
|
||||||
return MIHHeader(
|
return MIHHeader(
|
||||||
headerAlignment: MainAxisAlignment.end,
|
headerAlignment: MainAxisAlignment.end,
|
||||||
headerItems: [
|
headerItems: [
|
||||||
IconButton(
|
Visibility(
|
||||||
|
visible: _selectedIndex != 0,
|
||||||
|
child: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedIndex = 0;
|
_selectedIndex = 0;
|
||||||
|
|
@ -143,7 +145,24 @@ class _PatientViewState extends State<PatientView> {
|
||||||
size: 35,
|
size: 35,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: _selectedIndex == 0,
|
||||||
|
child: IconButton.filled(
|
||||||
|
iconSize: 35,
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.perm_identity,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: _selectedIndex != 1,
|
||||||
|
child: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedIndex = 1;
|
_selectedIndex = 1;
|
||||||
|
|
@ -154,7 +173,24 @@ class _PatientViewState extends State<PatientView> {
|
||||||
size: 35,
|
size: 35,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
),
|
||||||
|
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: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedIndex = 2;
|
_selectedIndex = 2;
|
||||||
|
|
@ -165,7 +201,57 @@ class _PatientViewState extends State<PatientView> {
|
||||||
size: 35,
|
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,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue