screenshot icon indicating copy to clipboard operation
screenshot copied to clipboard

FlutterError (View.of() was called with a context that does not contain a View widget.

Open mgeilich opened this issue 1 year ago • 4 comments

Received this when calling captureFromWidget(), why?

Exception has occurred. FlutterError (View.of() was called with a context that does not contain a View widget. No View widget ancestor could be found starting from the context that was passed to View.of(). The context used was: Scrollable(axisDirection: down, physics: null, restorationId: null, dirty, state: ScrollableState#828ca(lifecycle state: initialized, position: null, effective physics: null)) This usually means that the provided context is not associated with a View.)

mgeilich avatar Oct 17 '23 14:10 mgeilich

Same issue post flutter update.

jaredgreener avatar Jan 11 '24 19:01 jaredgreener

Pass context parameter from build context must solve the issue await screenshotController .captureFromWidget(_widget, context: context,

adityajangle avatar Feb 27 '24 07:02 adityajangle

It's not work

OpenJarvisAI avatar Apr 02 '24 15:04 OpenJarvisAI