showGestureIndicator static method
void
showGestureIndicator(
{ - required Offset position,
- Color color = Colors.red,
})
Implementation
static void showGestureIndicator(
{required Offset position, Color color = Colors.red}) {
OverlayEntry overlayEntry;
overlayEntry = OverlayEntry(
builder: (context) => Positioned(
left: position.dx - 25,
top: position.dy - 25,
child: Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
),
),
),
);
Overlay.of(Utils.globalKey.currentContext!).insert(overlayEntry);
Timer(Duration(milliseconds: 500), () {
overlayEntry.remove();
});
}