mark widget == and hashCode as nonVirtual (#46900)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
301b09f46e
commit
7fee0c52d3
@@ -12,6 +12,7 @@ library foundation;
|
||||
export 'package:meta/meta.dart' show
|
||||
immutable,
|
||||
mustCallSuper,
|
||||
nonVirtual,
|
||||
optionalTypeArgs,
|
||||
protected,
|
||||
required,
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user