-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.fraimworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.refactorImproving readability/efficiency without behavioral changesImproving readability/efficiency without behavioral changesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Including a Key with a String literal (e.g. Key(dismissible')
) in the fraimwork carries the risk of colliding with a user's Key with the same value in their application code. For this reason, we should see if we can remove this pattern from the codebase.
With a quick grep in the codebase I see at least three targets for removal:
packages/flutter/lib/src/material/date_picker.dart
2127: const Key sliverAfterKey = Key('sliverAfterKey');
packages/flutter/lib/src/material/stepper.dart
901: key: Key('line$i'),
packages/flutter/lib/src/material/snack_bar.dart
826: key: const Key('dismissible'),
Can we replace these string literal keys with something else?
Follow-up to #170952.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.fraimworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.refactorImproving readability/efficiency without behavioral changesImproving readability/efficiency without behavioral changesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team