diff --git a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart index 5d0717a0..444e8c80 100644 --- a/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart +++ b/Frontend/patient_manager/lib/mih_packages/patient_profile/patient_view.dart @@ -132,40 +132,126 @@ class _PatientViewState extends State { return MIHHeader( headerAlignment: MainAxisAlignment.end, headerItems: [ - IconButton( - onPressed: () { - setState(() { - _selectedIndex = 0; - }); - }, - icon: const Icon( - Icons.perm_identity, - size: 35, + Visibility( + visible: _selectedIndex != 0, + child: 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, + Visibility( + visible: _selectedIndex == 0, + child: IconButton.filled( + iconSize: 35, + onPressed: () { + setState(() { + _selectedIndex = 0; + }); + }, + icon: const Icon( + Icons.perm_identity, + ), ), ), - IconButton( - onPressed: () { - setState(() { - _selectedIndex = 2; - }); - }, - icon: const Icon( - Icons.file_present, - size: 35, + Visibility( + visible: _selectedIndex != 1, + child: IconButton( + onPressed: () { + setState(() { + _selectedIndex = 1; + }); + }, + 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, + // ), + // ), + // ], ); }