当前位置:网站首页>flutter 弹窗flutter_easyloading
flutter 弹窗flutter_easyloading
2022-06-09 10:23:00 【氤氲息】
参考
网上很多自定义弹窗界面,可以通过界面跳转的方式显示和隐藏,但是对于我来说有点难,因为弹窗往往会结合网络请求,这时候用插件的方式会好很多
插件地址如下
https://pub.flutter-io.cn/packages/flutter_easyloading
flutter_easyloading: ^3.0.3
首先在界面初始化
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(),
);
}
}
然后使用
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();
边栏推荐
- 叁拾玖- SQL对数据内容 分段/分组 汇总
- 复杂嵌套的对象池(2)——管理单个实例对象的对象池
- Thirty one - the number of mongodb links in nodejs simple proxy pool (combined) exploded
- error NU1202: Package Volo.Abp.Cli 5.2.1 is not compatible with netcoreapp3.1
- 用80%的工时拿100%的薪水,英国正式开启“四天工作制”试验!
- 基于任务调度的企业级分布式批处理方案
- 三拾壹- NodeJS簡單代理池(合) 之 MongoDB 鏈接數爆炸了
- 中银证券靠谱吗?开证券账户安全吗?
- CTF WEB WP杂谈
- OpenKruise v1.2:新增 PersistentPodState 实现有状态 Pod 拓扑固定与 IP 复用
猜你喜欢

How much do you know, deep analysis, worth collecting

不止于观测|阿里云可观测技术峰会正式上线

error NU1202: Package Volo.Abp.Cli 5.2.1 is not compatible with netcoreapp3.1

C# 图片验证码简单例子

加密/解密 公钥/私钥

Using source tree to delete remote and local warehouses by mistake

论文阅读 (53):Universal Adversarial Perturbations

米尔嵌入式CPU模组亮相工业控制技术研讨会

【Pyhton 实战】---- 批量【端午节】海报下载

使用五数概括法来确定数据集中的孤立点
随机推荐
叁拾肆- sklearn 根据样本对文本情绪进行分类
精诚所至,金石为开
Camtasia 2022最新版新增功能
Cyclodextrin metal organic framework( β- Cd-mof) loaded with dimercaptosuccinic acid( β- CD-MOF/DMSA) β- Drug loading mechanism of cyclodextrin metal organic framework
论文阅读 (53):Universal Adversarial Perturbations
Comptage du réseau | unités de chaque couche du Modèle OSI
Stop watch today
简单有趣的小蛇成长游戏--贪吃蛇
多线程系列之基本概念
What is Tencent PBD? Let me tell you
多线程之生产者和消费者模型
33 - nodejs simple proxy pool (it's estimated that it's over) the painful experience of using proxy by SuperAgent and the need to be careful
MOS管从入门到精通
PIC simulation (particle in cell codes) (task a and task C)
中银证券靠谱吗?开证券账户安全吗?
多线程中thread::join()和thread::detach()的区别
Cyclodextrin metal organic framework loaded low molecular weight heparin and adriamycin (MOF metal organic framework loaded biological macromolecular drugs)
叶酸配体的金属有机骨架材料MOFs负载5-氟尿嘧啶,西达本胺,紫杉醇,阿霉素,柔红霉素等药物
[fruit recognition] fruit recognition based on morphology, including Matlab source code
全局组织结构控制之抢滩登陆