Flutter-手撸一个加载弹框LoadingDialog

loading_dialog

A flutter widget of loading dialog.Easy to use.bash

Installing

dependencies:
  loading_dialog: ^0.0.1+1 #latest version
复制代码

Getting Started

Defaultide

LoadingDialog loading = LoadingDialog(context);
loading.show();
loading.hide();
复制代码

Your customui

LoadingDialog loadingDialog = LoadingDialog(
  buildContext: context,
  loadingView: null, //yourself loading view ,default is CircularProgressIndicator
  radius: 15, //dialog bg radius
  elevation: 0, //dialog elevation
  size: 50, // loading view size
  padding: 10, //text to loading view
  width: 150, //dialog width
  height: 150, //dialog height
  loadingMessage: "Loading...", //your message,if null dismiss
  textColor: Colors.black54, //message text color
  textSize: 14,//message text size
  style: LoadingDialogStyle.horizontal, // or vertical
  backgroundColor: Colors.white, //dialog background color
  barrierColor: Colors.black54, //window color
  barrierDismissible: true, //touch window dismiss
);
复制代码

上面属性能够针对本身需求设置spa

Simulator Screen Shot - iPhone Xʀ - 2019-07-03 at 14.59.14.png
Simulator Screen Shot - iPhone Xʀ - 2019-07-03 at 14.49.29.png
相关文章
相关标签/搜索
本站公众号
   欢迎关注本站公众号,获取更多信息