# Empty

页面无数据时的占位图。

# FLEmpty

FLEmpty 支持图片,文字,按钮以及加载指示器的搭配使用。

# loading


  Widget build(BuildContext context) {
    final Widget loadingEmpty = FLEmptyContainer(
      showLoading: true,
      title: 'Fetching...',
    );

    final Widget content = Container(
      child: Center(
        child: Text('This is content'),
      ),
    );

    return Scaffold(
      appBar: AppBar(
        title: Text('Loading'),
      ),
      body: Container(
        child: _showContent ? content : loadingEmpty,
      ),
    );
  }

你也可以通过 customLoadingWidget 属性来使用自定义的 loading 组件。

# hint

FLEmptyContainer(
    title: 'Contact is empty',
    detailText: 'Go to \'Settings\' - \'Privacy\' to view your contact permissions settings',
    space: 15,
)

# hint & action button

FLEmptyContainer(
  title: 'Request Failed',
  detailText: 'Please check the network status and retry',
  space: 12,
  actionButton: Container(
    width: 150,
    height: 35,
    child: RaisedButton(
      textColor: Colors.white,
      child: Text('Retry'),
      onPressed: () => print('retry'),
    ),
  )
)

# image & hint

FLEmptyContainer(
    image: Image.asset('assets/nodata.png'),
    title: 'No Data',
)