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 (kIsWeb && isNotMobile(context)) {
store.dispatch(StartLoading());
WidgetsBinding.instance.addPostFrameCallback((duration) {
store.dispatch(action);
});
} else {
store.dispatch(action);
}
store.dispatch(action);
}
}

View File

@ -428,47 +428,50 @@ class _DrawerTileState extends State<DrawerTile> {
}
}
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,
),
),
);