loading method

Widget loading(
  1. BuildContext context,
  2. bool loading
)

Implementation

Widget loading(BuildContext context, bool loading) {
  return loading
      ? Stack(children: [
          this.disabled(true),
          Positioned.fill(
            child: SizedBox(
              child: CircularProgressIndicator(
                color: Theme.of(context).primaryColor,
                strokeWidth: 3.0,
              ),
              height: 25.0,
              width: 25.0,
            ).center(),
          )
        ])
      : this;
}