nslogx / flutter_easyloading

✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
https://pub.dev/packages/flutter_easyloading
MIT License
1.26k stars 222 forks source link

How to use in FutureBuilder? #105

Open mytc opened 3 years ago

mytc commented 3 years ago

The FutureBuilder need to return a widget, but easyloading have to call the instance. How to solve this issue? FYI, I used this when loading a page, while waiting for the data to load, I need to show the loading indicator.


  if (snapshot.connectionState == ConnectionState.active ||
              snapshot.connectionState == ConnectionState.waiting) {
            EasyLoading.show();
            return SizedBox();
          }
github-actions[bot] commented 3 years ago

Thanks for taking the time to open an issue. I will have a look and answer as soon as possible.

neiljaywarner commented 3 years ago

bump

gOzaru commented 3 years ago

See this answer Hope it helps you.

ToxicGamer-exe commented 1 year ago

Sooooo... did anyone find a solution? 😅 I've spent my whole day trying to figure this out, I asked like 3 different chatbots, tried million different approaches, but no luck...

neiljaywarner commented 1 year ago

Could you use riverpod asyncvalue either with or without easyloader