Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 22084db

Browse files
authored
Remove unnecessary null checks in doc snippet (#39071)
1 parent 7d3233d commit 22084db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ui/hash_codes.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ part of dart.ui;
88
// int foo = 0;
99
// int bar = 0;
1010
// List<int> quux = <int>[];
11+
// List<int>? thud;
1112
// int baz = 0;
1213

1314
class _HashEnd { const _HashEnd(); }
@@ -59,11 +60,11 @@ class _Jenkins {
5960
/// int get hashCode => Object.hash(foo, bar, Object.hashAll(quux), baz);
6061
/// ```
6162
///
62-
/// If `quux` in this example was nullable, then it would need special handling,
63+
/// If a parameter is nullable, then it needs special handling,
6364
/// because [Object.hashAll]'s argument is not nullable:
6465
///
6566
/// ```dart
66-
/// int get hashCode => Object.hash(foo, bar, quux == null ? null : Object.hashAll(quux), baz);
67+
/// int get hashCode => Object.hash(foo, bar, thud == null ? null : Object.hashAll(thud), baz);
6768
/// ```
6869
@Deprecated(
6970
'Use Object.hash() instead. '

0 commit comments

Comments
 (0)