Working on inkwells

This commit is contained in:
Hillel Coren 2020-05-15 09:11:13 +03:00
parent 06890afbd5
commit e94faf0444
2 changed files with 44 additions and 48 deletions

View File

@ -325,14 +325,7 @@ void viewEntitiesByType({
} }
if (action != null) { if (action != null) {
if (kIsWeb && isNotMobile(context)) { store.dispatch(action);
store.dispatch(StartLoading());
WidgetsBinding.instance.addPostFrameCallback((duration) {
store.dispatch(action);
});
} else {
store.dispatch(action);
}
} }
} }

View File

@ -428,47 +428,50 @@ class _DrawerTileState extends State<DrawerTile> {
} }
} }
Widget child = Container( Widget child = Material(
color: isSelected color: Colors.transparent,
? convertHexStringToColor(enableDarkMode child: Container(
? kDefaultDarkSelectedColorMenu color: isSelected
: kDefaultLightSelectedColorMenu) ? convertHexStringToColor(enableDarkMode
: null, ? kDefaultDarkSelectedColorMenu
child: ListTile( : kDefaultLightSelectedColorMenu)
dense: true, : Colors.transparent,
leading: Icon( child: ListTile(
widget.icon, dense: true,
size: 20, leading: Icon(
color: textColor, widget.icon,
), size: 20,
title: state.prefState.isMenuCollapsed color: textColor,
? null ),
: Text( title: state.prefState.isMenuCollapsed
widget.title, ? null
style: Theme.of(context).textTheme.bodyText1.copyWith( : Text(
fontWeight: FontWeight.w100, widget.title,
fontSize: 16, style: Theme.of(context).textTheme.bodyText1.copyWith(
color: textColor, fontWeight: FontWeight.w100,
), fontSize: 16,
), color: textColor,
onTap: () => widget.entityType != null ),
? viewEntitiesByType( ),
context: context, entityType: widget.entityType) onTap: () => widget.entityType != null
: widget.onTap(), ? viewEntitiesByType(
onLongPress: () => widget.onLongPress != null context: context, entityType: widget.entityType)
? widget.onLongPress() : widget.onTap(),
: widget.entityType != null onLongPress: () => widget.onLongPress != null
? createEntityByType( ? widget.onLongPress()
context: context, entityType: widget.entityType) : widget.entityType != null
: null, ? createEntityByType(
/* context: context, entityType: widget.entityType)
trailing: _isHovered || : null,
!RendererBinding.instance.mouseTracker.mouseIsConnected /*
? trailingWidget trailing: _isHovered ||
: null, !RendererBinding.instance.mouseTracker.mouseIsConnected
? trailingWidget
: null,
*/ */
trailing: trailingWidget, trailing: trailingWidget,
),
), ),
); );