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] flutter Project Error: ScrollController attached to multiple scroll views, Failed assertion: line 109 pos 12
- AUC Error – ValueError: Data is not binary and pos_label is not specified
- Resolve InsecurePlatformWarning: A true SSLContext object is not available.
- Springboot connects to the database error: testWhileIdle is true, validationQuery not set
- [Solved] Opencv Error: Error: Assertion failed (data) in cv::Mat::at, file … mat.inl.hpp, line 897(Accessed pixels of non-existent matrix)
- SpringBoot Error running ‘Application’: Command line is too long.Shorten command line for
- [Solved] Error running XxlJobExecutorHiveApplication. Command line is too long. Shorten the command line via
- Error running ‘PigSellCabinetApplication’: Command line is too long. Shorten command line for PigSellCabinetApplication or also for Spring Boot default configuration
- When using postman assertion, the global variables set in the tests of the pit will take effect only after the interface is executed
- [Solved] Unity Error: Assertion failed on expression: ‘IsMatrixValid(matrix)‘…
- [Solved] Error running ‘LocalTest‘: Command line is too long. Shorten command line for LocalTest or also for…
- [Solved] validateNewTexture:89: failed assertion `BytesPerRow of a buffer-backed texture with pixelFormat
- [Solved] Error running ‘WebApplication‘: Command line is too long. Shorten command line for WebApplication or
- Qt Error: Debug Assertion Failed [How to Solve]
- Klee Error: Assertion `userMainFn && “unable to get user main“‘ failed
- [TensorRT] INTERNAL ERROR: Assertion failed: mem = nullpt
- [Solved] OpenCv5 error: (-215:Assertion failed) !_descriptors.empty() in function ‘add‘
- [Solved] error C4996: ‘QWheelEvent::pos‘: Use position()
- Android 10 open file exception open failed: eacces (permission denied) android:requestLegacyExternalStorage= “true“