当前位置:网站首页>Shutter popup shutter shutter_ easyloading

Shutter popup shutter shutter_ easyloading

2022-06-09 11:15:00 Dense information

Reference resources
There are many user-defined pop-up interfaces on the Internet , It can be displayed and hidden through interface jump , But it's a little hard for me , Because pop ups are often combined with network requests , At this time, it will be much better to use plug-ins
The plug-in address is as follows

https://pub.flutter-io.cn/packages/flutter_easyloading
flutter_easyloading: ^3.0.3

First initialize in the interface

class MyApp extends StatelessWidget {
    
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    
    return MaterialApp(
      title: 'Flutter EasyLoading',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter EasyLoading'),
      builder: EasyLoading.init(),
    );
  }
}

And then use

EasyLoading.show(status: 'loading...');

EasyLoading.showProgress(0.3, status: 'downloading...');

EasyLoading.showSuccess('Great Success!');

EasyLoading.showError('Failed with Error');

EasyLoading.showInfo('Useful Information.');

EasyLoading.showToast('Toast');

EasyLoading.dismiss();
原网站

版权声明
本文为[Dense information]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091023407632.html