Skip to content

Some classes override operator == with a nullable parameter #117838

@srawlins

Description

@srawlins

At runtime, a null value is never passed to ==. No class should ever expect that it might get a nullable type.

I see the following two operator == overrides which accept a nullable parameter:

warning • The parameter type of '==' operators should be non-nullable • packages/flutter/lib/src/material/about.dart:759:17 • non_nullable_equals_parameter
warning • The parameter type of '==' operators should be non-nullable • packages/flutter/test/rendering/mouse_tracker_cursor_test.dart:465:17 • non_nullable_equals_parameter

See dart-lang/sdk#58753 which will soon be enforced.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: null-safetySupport for Dart's null safety featurec: contributor-productivityTeam-specific productivity, code health, technical debt.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions