From e1a7d7d8651c6bcfebfbf164b2b1f2166b5444c5 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 29 Jan 2016 12:01:53 -0800 Subject: [PATCH] fix two strong mode issues --- packages/flutter/lib/src/widgets/semantics_debugger.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/semantics_debugger.dart b/packages/flutter/lib/src/widgets/semantics_debugger.dart index de82885af9..7c210ee0c8 100644 --- a/packages/flutter/lib/src/widgets/semantics_debugger.dart +++ b/packages/flutter/lib/src/widgets/semantics_debugger.dart @@ -123,7 +123,9 @@ class _SemanticsDebuggerEntry { int findDepth() { if (children == null || children.isEmpty) return 1; - return children.map((_SemanticsDebuggerEntry e) => e.findDepth()).reduce(math.max) + 1; + return children.map((_SemanticsDebuggerEntry e) => e.findDepth()).reduce((int runningDepth, int nextDepth) { + return math.max(runningDepth, nextDepth); + }) + 1; } static const TextStyle textStyles = const TextStyle( @@ -346,7 +348,7 @@ class _SemanticsDebuggerPainter extends CustomPainter { final Point pointerPosition; void paint(Canvas canvas, Size size) { _SemanticsDebuggerClient.instance.nodes[0]?.paint( - canvas, + canvas, _SemanticsDebuggerClient.instance.nodes[0].findDepth() ); if (pointerPosition != null) {