Unverified Commit e2042bae authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Revert "Add assert that the root widget has been attached. (#32437)" (#33068)

This reverts commit 069303d4.
parent 90f38907
...@@ -736,12 +736,6 @@ mixin WidgetsBinding on BindingBase, SchedulerBinding, GestureBinding, RendererB ...@@ -736,12 +736,6 @@ mixin WidgetsBinding on BindingBase, SchedulerBinding, GestureBinding, RendererB
).attachToRenderTree(buildOwner, renderViewElement); ).attachToRenderTree(buildOwner, renderViewElement);
} }
/// Whether the [renderViewElement] has been initialized.
///
/// This will be false until [runApp] is called (or [WidgetTester.pumpWidget]
/// is called in the context of a [TestWidgetsFlutterBinding]).
bool get isRootWidgetAttached => _renderViewElement != null;
@override @override
Future<void> performReassemble() { Future<void> performReassemble() {
assert(() { assert(() {
......
...@@ -175,8 +175,6 @@ class FlutterDriverExtension { ...@@ -175,8 +175,6 @@ class FlutterDriverExtension {
/// the result into a subclass of [Result], but that's not strictly required. /// the result into a subclass of [Result], but that's not strictly required.
@visibleForTesting @visibleForTesting
Future<Map<String, dynamic>> call(Map<String, String> params) async { Future<Map<String, dynamic>> call(Map<String, String> params) async {
assert(WidgetsBinding.instance.isRootWidgetAttached,
'No root widget is attached; have you remembered to call runApp()?');
final String commandKind = params['command']; final String commandKind = params['command'];
try { try {
final CommandHandlerCallback commandHandler = _commandHandlers[commandKind]; final CommandHandlerCallback commandHandler = _commandHandlers[commandKind];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment