Click the screenshot of the flitter to call the screenshot method for the first time, and an error is reported
Failed assertion: line 3180 pos 12: ‘debugNeedsPaint’: is not true.
flutter: 'package:flutter/src/rendering/proxy_box.dart': Failed assertion: line 3180 pos 12: '!debugNeedsPaint': is not true.
Solution:
Add a delay call when calling the screenshot method
onPressed: () {
Future.delayed(Duration.zero, () {
this._capturePng();
});
},
Read More:
- [Solved] Fluent filesysterexception: exists failed, path =’d: \ as’. Plugins’ (OS error: incorrect file name, directory name or volume slogan)
- [Solved] flutter Project Error: ScrollController attached to multiple scroll views, Failed assertion: line 109 pos 12
- Flutter upgrade upgrade SDK SSL_ERROR_Syscall error [How to Solve]
- [Solved] Flyter uses screenutil to obtain screen width and height initialization error
- [Solved] Vsync Error: this error in animationcontroller in fluent
- [Solved] Error: Cannot run with sound null safety, because the following dependenciesdon‘t support null safe
- flutter | W/zipro(12512): Error opening archive D:\…Invalid file ERROR: dump failed because…
- jenkins pipeline Shared Library Error: No signature of method
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- [Solved] Flutter compile error: Failed to find Build Tools revision 29.0.2
- Unable to find bundled Java version =>Mac Flutter [Android Studio Arctic Fox 2020.3.1]
- flutter, Unable to buy item, Error response code: 7 & flutter_inapp_purchase
- IDEA generates Spring Boot project error: error: read timed out
- [Solved] validateNewTexture:89: failed assertion `BytesPerRow of a buffer-backed texture with pixelFormat
- Unity Error: Asset database transaction committed twice!
- [Solved] Gulp-sass Install Error: error: cannot find module ‘sass‘
- When using postman assertion, the global variables set in the tests of the pit will take effect only after the interface is executed
- [Easy Solution] flutter Run Error: library “libflutter.so“ not found
- Flutter Xcode Module not found or LibreSSL SSL_connect: SSL_ERROR_SYSCALL
- [Solved] Error from server (InternalError): an error on the server (““) has prevented the request from suc