loading_switch 0.1.0

Flutter Android iOS web

loading_switch package for flutter,you can use it to swtich loading page status(loading、content、error、empty or more)

loading_switch #

Pub support
Flutter加载切换库

预览 #

如何使用 #

添加依赖 #

dependencies:
  loading_switch: ^0.1.0

如何使用 #

///控制器
final controller = LoadingSwitchController();

LoadingSwitch(
      controller: controller,
      child: child,
      loading: ...,
      error: ...,
      empty: ...,
      option: ...
    );

///显示加载中
controller.showLoading();
    

有如下三种方式设置加载页面

  • 全局设置,在应用初始化时设置
LoadingSwitch.defaultOption
  • 初始化LoadingSwitch时配置option属性
  • 初始化LoadingSwitch时配置loading error等属性
    优先级:
    loading error等 > option > defaultOption

具体设置请参考example

Example #

cd ./example
flutter create .
flutter run

License #

Apache License 2.0

Copyright (c) 2018-2019 codingfd

0
likes
110
pub points
0%
popularity

loading_switch package for flutter,you can use it to swtich loading page status(loading、content、error、empty or more)

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

codingfd.zhou@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on loading_switch