Unverified Commit 4e842566 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Error message when TextSelectionOverlay finds no Overlay (#29329)

parent 97a81209
......@@ -254,7 +254,10 @@ class TextSelectionOverlay {
assert(context != null),
_value = value {
final OverlayState overlay = Overlay.of(context);
assert(overlay != null);
assert(overlay != null,
'No Overlay widget exists above $context.\n'
'Usually the Navigator created by WidgetsApp provides the overlay. Perhaps your '
'app content was created above the Navigator with the WidgetsApp builder parameter.');
_toolbarController = AnimationController(duration: fadeDuration, vsync: overlay);
}
......
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