You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when writing tests for methods that contain EasyLoading. #172
When writing a Unit Test for a method i have that has EasyLoading.showToast() being called in it.
I get the following error: 'package:flutter_easyloading/src/easy_loading.dart': Failed assertion: line 425 pos 7: 'overlayEntry != null': You should call EasyLoading.init() in your MaterialApp
I tried instantiating the MaterialApp in the test and calling EasyLoading.init() but that didn't work.
@OmarZakiAli Dont think so, i think i changed my testable method to throw errors instead (As should be) and the UI simply catches and shows the appropriate toast.
Activity
github-actions commentedon May 31, 2022
Thanks for taking the time to open an issue. I will have a look and answer as soon as possible.
OmarZakiAli commentedon Nov 29, 2023
no solution yet?
yassinsameh commentedon Nov 29, 2023
@OmarZakiAli Dont think so, i think i changed my testable method to throw errors instead (As should be) and the UI simply catches and shows the appropriate toast.