mark widget == and hashCode as nonVirtual (#46900)

This commit is contained in:
Phil Quitslund
2020-01-06 09:43:02 -08:00
committed by Flutter GitHub Bot
parent 301b09f46e
commit 7fee0c52d3
2 changed files with 8 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ library foundation;
export 'package:meta/meta.dart' show
immutable,
mustCallSuper,
nonVirtual,
optionalTypeArgs,
protected,
required,

View File

@@ -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.