Differences:
-
They both provide many common features like
onTap,onLongPressetc. The main difference isGestureDetectorprovides more controls like dragging etc. on the other hand it doesn’t include ripple effect tap, whichInkWelldoes. -
You can use either of them according to your needs, you want ripple effects go with
InkWell, need more controls go withGestureDetectoror even combine both of them.
Ripple effect (using InkWell):
InkWell(
onTap: () {},
child: Ink(
width: 200,
height: 200,
color: Colors.blue,
),
)
