jd_loading 0.1.5

Flutter Android iOS web

For The Jingdong APP, Flutter version unified loading package, can be directly introduced into the project to use, or can be imported by custom Widget,just use it now.

jd_loading #

京东系APP统一Loading

示例预览 #

如何使用? #

依赖library:

dependencies:
  jd_loading: ^0.1.5
  

在入口页面初始化:

class MyApp extends StatelessWidget {
  double percentage = 0.0;

  @override
  Widget build(BuildContext context) {
    Application.appContext = context;
    //初始化
    JDLoading.init(context);
    return Scaffold(
    );
  }
}

在任意页面调用,展示loading:

JDLoading.show();
  

如果需要initState展示,则需要等页面渲染完,再调用,比如监听页面帧是否渲染完毕等

WidgetsBinding.instance
       .addPostFrameCallback((_) => _showDialogFrame(context));
  

如果不显示,需要重新传入BuildContext,(测试遇见使用FlutterBoost时候,需要重新传入context)

JDLoading.loading(context);
  

更多使用,参见example.

0
likes
105
pub points
0%
popularity

For The Jingdong APP, Flutter version unified loading package, can be directly introduced into the project to use, or can be imported by custom Widget,just use it now.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

weichunsheng3611@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on jd_loading