diff --git a/packages/flutter/lib/foundation.dart b/packages/flutter/lib/foundation.dart index ecc79249db..37a270b29d 100644 --- a/packages/flutter/lib/foundation.dart +++ b/packages/flutter/lib/foundation.dart @@ -12,6 +12,7 @@ library foundation; export 'package:meta/meta.dart' show immutable, mustCallSuper, + nonVirtual, optionalTypeArgs, protected, required, diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 6252327e34..47f3d56d15 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -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.