From 1a061dd8e52bf885327e47bdeeabe25106253c61 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 17 Jan 2020 15:23:01 -0800 Subject: [PATCH] Avoid runtimeType.toString in describeIdentity (#49087) --- packages/flutter/lib/src/foundation/diagnostics.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart index 1a2243864c..118e1d071f 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart @@ -9,6 +9,7 @@ import 'package:meta/meta.dart'; import 'assertions.dart'; import 'constants.dart'; import 'debug.dart'; +import 'object.dart'; // Examples can assume: // int rows, columns; @@ -2962,7 +2963,7 @@ String shortHash(Object object) { /// distinguish instances of the same class (hash collisions are /// possible, but rare enough that its use in debug output is useful). /// * [Object.runtimeType], the [Type] of an object. -String describeIdentity(Object object) => '${object.runtimeType}#${shortHash(object)}'; +String describeIdentity(Object object) => '${objectRuntimeType(object, '')}#${shortHash(object)}'; // This method exists as a workaround for https://github.com/dart-lang/sdk/issues/30021 /// Returns a short description of an enum value.