Skip to content

InkWell onTap onDoubleTap malfunctions splashColor / highlightColor #96338

@simpleapps4goodlife

Description

@simpleapps4goodlife

Hello,
My widget has both onTap and onDoubleTap defined.
If you tap on the widget but then with just a very slight delay tap again ( to make it into a double tap), then tap gets cancelled and onDoubleTap gets called.

However the splashColor effect and highlightColor effect starts malfunctioning.
Screenshot_1641652079

`
// @dart=2.9
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _MyAppState();
  }
}

class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    final title = 'Inkwell Splash Bug';

    return MaterialApp(
        title: title,
        home: Scaffold(
            appBar: AppBar(
              title: Text(title),
            ),
            body: Center(
                child: Material(
              child: InkWell(
                child: SizedBox(
                  height: 150,
                  width: 150,
                  child: Center(child: Text("Tap then Double Tap.\n\nSplash Stays. \n\nDo it again Highlight Stays"),),
                ),
                onTap: () {
                  print("Tap Called");
                },
                onDoubleTap: () {
                  print("Tap Called");
                },
                onTapCancel: () {
                  print("Tap Cancelled");
                },
              ),
            ))));
  }
}
`

Metadata

Metadata

Assignees

Labels

f: gesturesflutter/packages/flutter/gestures repository.f: material designflutter/packages/flutter/material repository.found in release: 2.8Found to occur in 2.8found in release: 2.9Found to occur in 2.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions