flutter_state_view 0.0.9
flutter_state_view: ^0.0.9 copied to clipboard

Flutter Android iOS web

flutter state view with loading,empty,error show

flutter_state_view #

flutter state view with loading,empty,error show <br/>

使用方法:<br/>

    StateView(
      state: state,
      loadingLabel:'加载中...',
      emptyLabel: '空空如也',
      errorLabel: '我错了',
      onRetry: this.onRetry,
      child: Text('成功页面!'),
    ),
    

快捷使用方法:<br/> //初始化

StateView page;

page = Column(
  mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
  Text(
    'You have pushed the button this many times11:',
  ),
  Text(
    '$_counter',
    style: Theme.of(context).textTheme.headline4,
  ),
],
).center().pageState();

//改变状态:

page.pageStateLoading("加载中...");
Future.delayed(Duration(seconds: 3)).then((value) {
  page.configErrorImage('imgs/empty.png');
  page.pageStateErrorWithRetry("出错了!",(iserror)=>{
    this._incrementCounter()
  });
}); 

效果图如下:<br/> image image image

Getting Started #

2
likes
70
pub points
19%
popularity

flutter state view with loading,empty,error show

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

g18559863603@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_state_view