-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
the new _IconButtonM3 is reusing the parent widget key. (line 500 of icon_button.dart)
return _IconButtonM3(
key: key,
// ...
);which can make some tests fail, "expected 1 widget with key x but found 2" .
As explained in a similar issue where flutter duplicates keys, here: #103266 , I'm under the impression that flutter should not reuse keys. I could be wrong though as this seems to be something recurring. It's definitely unexpected though.
This was caught by our test suite updating to latest master.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version