From e94faf04443baea650ee25ccd05d64a42b815f13 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 15 May 2020 09:11:13 +0300 Subject: [PATCH] Working on inkwells --- lib/redux/app/app_actions.dart | 9 +--- lib/ui/app/menu_drawer.dart | 83 ++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 48 deletions(-) diff --git a/lib/redux/app/app_actions.dart b/lib/redux/app/app_actions.dart index c26d26f8b..23933b9de 100644 --- a/lib/redux/app/app_actions.dart +++ b/lib/redux/app/app_actions.dart @@ -325,14 +325,7 @@ void viewEntitiesByType({ } if (action != null) { - if (kIsWeb && isNotMobile(context)) { - store.dispatch(StartLoading()); - WidgetsBinding.instance.addPostFrameCallback((duration) { - store.dispatch(action); - }); - } else { - store.dispatch(action); - } + store.dispatch(action); } } diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index 5c616a42b..5e6108013 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -428,47 +428,50 @@ class _DrawerTileState extends State { } } - Widget child = Container( - color: isSelected - ? convertHexStringToColor(enableDarkMode - ? kDefaultDarkSelectedColorMenu - : kDefaultLightSelectedColorMenu) - : null, - child: ListTile( - dense: true, - leading: Icon( - widget.icon, - size: 20, - color: textColor, - ), - title: state.prefState.isMenuCollapsed - ? null - : Text( - widget.title, - style: Theme.of(context).textTheme.bodyText1.copyWith( - fontWeight: FontWeight.w100, - fontSize: 16, - color: textColor, - ), - ), - onTap: () => widget.entityType != null - ? viewEntitiesByType( - context: context, entityType: widget.entityType) - : widget.onTap(), - onLongPress: () => widget.onLongPress != null - ? widget.onLongPress() - : widget.entityType != null - ? createEntityByType( - context: context, entityType: widget.entityType) - : null, - /* - trailing: _isHovered || - !RendererBinding.instance.mouseTracker.mouseIsConnected - ? trailingWidget - : null, + Widget child = Material( + color: Colors.transparent, + child: Container( + color: isSelected + ? convertHexStringToColor(enableDarkMode + ? kDefaultDarkSelectedColorMenu + : kDefaultLightSelectedColorMenu) + : Colors.transparent, + child: ListTile( + dense: true, + leading: Icon( + widget.icon, + size: 20, + color: textColor, + ), + title: state.prefState.isMenuCollapsed + ? null + : Text( + widget.title, + style: Theme.of(context).textTheme.bodyText1.copyWith( + fontWeight: FontWeight.w100, + fontSize: 16, + color: textColor, + ), + ), + onTap: () => widget.entityType != null + ? viewEntitiesByType( + context: context, entityType: widget.entityType) + : widget.onTap(), + onLongPress: () => widget.onLongPress != null + ? widget.onLongPress() + : widget.entityType != null + ? createEntityByType( + context: context, entityType: widget.entityType) + : null, + /* + trailing: _isHovered || + !RendererBinding.instance.mouseTracker.mouseIsConnected + ? trailingWidget + : null, - */ - trailing: trailingWidget, + */ + trailing: trailingWidget, + ), ), );