From 31b1964a2380cbd216547e88e67bd653a6d894ed Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 21 Apr 2017 09:32:32 -0700 Subject: [PATCH] Document that you can call runApp again (#9526) This is such a fundamental property of the system that we forgot to document it. Fixes #6818 --- packages/flutter/lib/src/widgets/binding.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index ae9a4deb16..7cce157b41 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart @@ -121,10 +121,10 @@ abstract class WidgetsBinding extends BindingBase implements GestureBinding, Ren final BuildOwner _buildOwner = new BuildOwner(); /// The object in charge of the focus tree. - /// + /// /// Rarely used directly. Instead, consider using [FocusScope.of] to obtain /// the [FocusScopeNode] for a given [BuildContext]. - /// + /// /// See [FocusManager] for more details. final FocusManager focusManager = new FocusManager(); @@ -410,6 +410,12 @@ abstract class WidgetsBinding extends BindingBase implements GestureBinding, Ren /// (e.g., the top), consider using the [Align] widget. If you wish to center /// your widget, you can also use the [Center] widget /// +/// Calling [runApp] again will detach the previous root widget from the screen +/// and attach the given widget in its place. The new widget tree is compared +/// against the previous widget tree and any differences are applied to the +/// underlying render tree, similar to what happens when a [StatefulWidget] +/// rebuilds after calling [State.setState]. +/// /// Initializes the binding using [WidgetsFlutterBinding] if necessary. /// /// See also: