![]() |
VOOZH | about |
InkWell is the material widget in Flutter. It responds to the touch action as performed by the user. Inkwell will respond when the user clicks the button. There are so many gestures like double-tap, long press, tap down, etc.
Syntax:
InkWell(
onTap: () {
// Your action here
},
child: YourWidget(),
)
Create a new Flutter application using the command Prompt. To create a new app, write the following command and run it.
flutter create app_nameTo know more about it refer this article: Creating a Simple Application in Flutter.
main.dart
You can customize its behavior using these properties:
Property | Description |
|---|---|
onTap | Called when the user taps |
onDoubleTap | Called on double-tap |
onLongPress | Called on long press |
borderRadius | Makes ripple have rounded corners |
splashColor | Changes ripple color |
highlightColor | Color shown when pressed |
The InkWell widget is perfect when you want to give your users visual feedback on touch interactions, especially when building custom buttons, cards, or tappable containers.
It’s a small but powerful widget that makes your app feel more interactive and native.