Flutter InkWell with Container as child is not showing effects
120
Solution 1
you should have a Scaffold
or at least a Material
as ancestor
Solution 2
The InkWell
widget must have a Material
widget as an ancestor.
Wrap your InkWell in Material widget.
Author by
Chris
Updated on December 28, 2022Comments
-
Chris over 1 year
I have a simple
InkWell
with aContainer
inside of it. I would like to have theripple
affect but it is not showing. Neither ishoverColor
/focusColor
...My button:
class EntryNextButton extends StatelessWidget { @override Widget build(BuildContext context) { return InkWell( onTap: () { print("Container clicked"); }, child: Container( ... ); } }
What am I missing here?
-
Calvin Gonsalves about 3 yearsThis will help you stackoverflow.com/questions/45424621/…
-