✨ Drawer tooltip on collapse mode
This commit is contained in:
parent
bc99865ba8
commit
2ec25fd1a2
@ -241,7 +241,9 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
|
||||
children: AppNavigation.destinations
|
||||
.map(
|
||||
(e) => _isCollapsed
|
||||
? InkWell(
|
||||
? Tooltip(
|
||||
message: e.label,
|
||||
child: InkWell(
|
||||
child: Icon(e.icon, size: 20).paddingSymmetric(
|
||||
horizontal: 28,
|
||||
vertical: 16,
|
||||
@ -250,6 +252,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
|
||||
AppRouter.instance.goNamed(e.page);
|
||||
_closeDrawer();
|
||||
},
|
||||
),
|
||||
)
|
||||
: ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
@ -279,7 +282,9 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
|
||||
Column(
|
||||
children: [
|
||||
if (_isCollapsed)
|
||||
InkWell(
|
||||
Tooltip(
|
||||
message: 'settings'.tr,
|
||||
child: InkWell(
|
||||
child: const Icon(
|
||||
Icons.settings,
|
||||
size: 20,
|
||||
@ -291,6 +296,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
|
||||
AppRouter.instance.pushNamed('settings');
|
||||
_closeDrawer();
|
||||
},
|
||||
),
|
||||
)
|
||||
else
|
||||
ListTile(
|
||||
@ -306,7 +312,9 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
|
||||
},
|
||||
),
|
||||
if (_isCollapsed)
|
||||
InkWell(
|
||||
Tooltip(
|
||||
message: 'expand'.tr,
|
||||
child: InkWell(
|
||||
child: const Icon(Icons.chevron_right, size: 20)
|
||||
.paddingSymmetric(
|
||||
horizontal: 28,
|
||||
@ -315,6 +323,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
|
||||
onTap: () {
|
||||
_expandDrawer();
|
||||
},
|
||||
),
|
||||
)
|
||||
else
|
||||
ListTile(
|
||||
|
@ -77,7 +77,10 @@ class AppNavigationRegion extends StatelessWidget {
|
||||
final element = index >= noRealmGroupChannels.length
|
||||
? hasRealmGroupChannels[index - noRealmGroupChannels.length]
|
||||
: noRealmGroupChannels[index];
|
||||
return _buildEntry(context, element);
|
||||
return Tooltip(
|
||||
message: element.name,
|
||||
child: _buildEntry(context, element),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user