From e2a55fe83fe225639457547e1c8a52587970ecba Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 2 Jul 2019 11:11:48 -0700 Subject: [PATCH] update reassemble doc (#35164) --- packages/flutter/lib/src/widgets/framework.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 6df9d11b16..7fc6bc15a6 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -2665,6 +2665,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext { /// This function will only be called during development. In release builds, /// the `ext.flutter.reassemble` hook is not available, and so this code will /// never execute. + /// + /// Implementers should not rely on any ordering for hot reload source update, + /// reassemble, and build methods after a hot reload has been initiated. It is + /// possible that a [Timer] (e.g. an [Animation]) or a debugging session + /// attached to the isolate could trigger a build with reloaded code _before_ + /// reassemble is called. Code that expects preconditions to be set by + /// reassemble after a hot reload must be resilient to being called out of + /// order, e.g. by fizzling instead of throwing. That said, once reassemble is + /// called, build will be called after it at least once. /// {@endtemplate} /// /// See also: