Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark widget == and hashCode as nonVirtual #46900

Merged
merged 3 commits into from Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/flutter/lib/foundation.dart
Expand Up @@ -12,6 +12,7 @@ library foundation;
export 'package:meta/meta.dart' show
immutable,
mustCallSuper,
nonVirtual,
optionalTypeArgs,
protected,
required,
Expand Down
7 changes: 7 additions & 0 deletions packages/flutter/lib/src/widgets/framework.dart
Expand Up @@ -451,6 +451,13 @@ abstract class Widget extends DiagnosticableTree {
properties.defaultDiagnosticsTreeStyle = DiagnosticsTreeStyle.dense;
}

@override
@nonVirtual
bool operator ==(dynamic other) => super==other;

@override
@nonVirtual
int get hashCode => super.hashCode;

/// Whether the `newWidget` can be used to update an [Element] that currently
/// has the `oldWidget` as its configuration.
Expand Down