Open ahmed-alhelali opened 1 year ago
I've got this too, in my case I dont even have to navigate. I just scroll to where the widget is and I see it.
That's really strange (:
I'm getting the similar error,
PersistedOffset: is in an unexpected state. Expected one of: PersistedSurfaceState.active, PersistedSurfaceState.released But was: PersistedSurfaceState.pendingRetention
Seemingly they are related but this happens when I'm scrolling and the color of the svg is changed. if I don't change the original color of the SVG, this won't happen.
Hi everyone!
First of all, thanks a lot for this awesome plugin!
I'm trying to use the flutter_svg to display the icons everywhere in my app, and everything works perfectly if the platform is Android
but!, when the platform is Web and when I try to pop back using "navigator.pop(context)" to a route/screen that shows an SVG in the AppBar(which I use svg_flutter to display) I'm getting this error
======== Exception caught by scheduler library ===================================================== The following PersistedSurfaceException was thrown during a scheduler callback: PersistedOffset: is in an unexpected state. Expected one of: PersistedSurfaceState.active, PersistedSurfaceState.released But was: PersistedSurfaceState.pendingRetention
When the exception was thrown, this was the stack: C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 266:49 throw C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/html/surface.dart 179:3 debugAssertSurfaceState C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/html/scene_builder.dart 294:14 addRetained packages/flutter/src/rendering/layer.dart 643:14 [_addToSceneWithRetainedRendering] packages/flutter/src/rendering/layer.dart 1241:12 addChildrenToScene packages/flutter/src/rendering/layer.dart 1378:5 addToScene packages/flutter/src/rendering/layer.dart 646:5 [_addToSceneWithRetainedRendering] packages/flutter/src/rendering/layer.dart 1241:12 addChildrenToScene packages/flutter/src/rendering/layer.dart 1378:5 addToScene packages/flutter/src/rendering/layer.dart 646:5 [_addToSceneWithRetainedRendering] packages/flutter/src/rendering/layer.dart 1241:12 addChildrenToScene packages/flutter/src/rendering/layer.dart 1834:5 addToScene packages/flutter/src/rendering/layer.dart 1054:5 buildScene packages/flutter/src/rendering/view.dart 231:30 compositeFrame packages/flutter/src/rendering/binding.dart 517:18 drawFrame packages/flutter/src/widgets/binding.dart 884:13 drawFrame packages/flutter/src/rendering/binding.dart 378:5 [_handlePersistentFrameCallback] packages/flutter/src/scheduler/binding.dart 1175:15 [_invokeFrameCallback] packages/flutter/src/scheduler/binding.dart 1104:9 handleDrawFrame packages/flutter/src/scheduler/binding.dart 1015:5 [_handleDrawFrame] C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/platform_dispatcher.dart 1168:13 invoke C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/platform_dispatcher.dart 219:5 invokeOnDrawFrame C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/initialization.dart 195:45
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14 _checkAndCall
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39 dcall
this is the code example of the first screen that contains the SVG icon in the AppBar