diff --git a/packages/flutter/lib/foundation.dart b/packages/flutter/lib/foundation.dart index ecc79249dbe3e1..37a270b29dcd30 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 f6084e43ce1bb7..0efeaeee5d351c 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.