From bc1c7e6cfa7d1201dfd940be916cd3361dd9e700 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Mon, 23 Jan 2023 12:43:22 -0800 Subject: [PATCH] Remove unnecessary null checks in doc snippet (flutter/engine#39071) --- engine/src/flutter/lib/ui/hash_codes.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/lib/ui/hash_codes.dart b/engine/src/flutter/lib/ui/hash_codes.dart index ea0f5b9162..b1a332395b 100644 --- a/engine/src/flutter/lib/ui/hash_codes.dart +++ b/engine/src/flutter/lib/ui/hash_codes.dart @@ -8,6 +8,7 @@ part of dart.ui; // int foo = 0; // int bar = 0; // List quux = []; +// List? thud; // int baz = 0; class _HashEnd { const _HashEnd(); } @@ -59,11 +60,11 @@ class _Jenkins { /// int get hashCode => Object.hash(foo, bar, Object.hashAll(quux), baz); /// ``` /// -/// If `quux` in this example was nullable, then it would need special handling, +/// If a parameter is nullable, then it needs special handling, /// because [Object.hashAll]'s argument is not nullable: /// /// ```dart -/// int get hashCode => Object.hash(foo, bar, quux == null ? null : Object.hashAll(quux), baz); +/// int get hashCode => Object.hash(foo, bar, thud == null ? null : Object.hashAll(thud), baz); /// ``` @Deprecated( 'Use Object.hash() instead. '