Open ryanhoo95 opened 4 years ago
I'm having the same exact issue. For some reason it's registering the taps behind the sliding panel, instead of the Inkwell. But it looks like this issue doesn't discriminate because it occurs with pretty much any 'onTap' or 'onClick'.
+1
Only way around this is to wrap Material around the onPress-able widget, however if there are custom colors involved (which is most likely) there are additional work on styling.
For example, all my ButtonIcon and Buttons did not cause the 'ripple effect' so had to wrap it around a ClipRRect (for borderRadius) and Material, then followed by actual child Widget:
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(16.0)),
// TODO: Bug on sliding panel not triggering InkWell #https://github.com/akshathjain/sliding_up_panel/issues/152
child: Material(
color: colourLight,
child: Container(
child: IconButton(
icon: icon,
iconSize: 36.0,
color: colourBold,
onPressed: onPressed,
),
),
),
);
}
Looks like this is still happening. A slightly more subtle variation of @json469's useful workaround is to use a Material
with type
set to MaterialType.transparency
so that only the ink splashes and highlights occur.
return Material(
type: MaterialType.transparency,
child: IconButton(
icon: Icon(Icons.add),
onPressed: (){},
),
);
Describe the bug Difficult to detect inkwell's onTap when using panelBuilder.
To Reproduce Use panelBuilder to add content which consist of inkwell and listview. The inkwell's onTap is hard to trigger.