refactor: swap gesture dector in top navbar to allow bigger tap zone
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Hugo Pointcheval 2023-07-10 15:15:29 +02:00
parent 9a3ae2de5c
commit de69ee89cd
Signed by: hugo
GPG Key ID: 3AAC487E131E00BC

View File

@ -106,14 +106,14 @@ class TopNavigationBar extends TopNavigationBarComponent
.map<int, Widget>( .map<int, Widget>(
(key, value) => MapEntry( (key, value) => MapEntry(
key, key,
Padding( GestureDetector(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () { onTap: () {
onTap?.call(context, key); onTap?.call(context, key);
}, },
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: NavigationItem( child: NavigationItem(
item: value, item: value,
selected: key == currentIndex, selected: key == currentIndex,