showLoading static method

dynamic showLoading(
  1. BuildContext context, {
  2. String? text,
})

只适合在当前页面展示,对于一个已经销毁的widget,调用hideLoading会有问题,建议使用JJLoadingUtils 已废弃,使用JJLoadingUtils.showLoading代替JJDialogUtils.showLoading

Implementation

static showLoading(BuildContext context, {String? text}) {
  JJDialogController(
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
          dialogContainer: JJDialogContainer(
              type: JJDialogType.loading,
              clipBehavior: Clip.antiAlias,
              decoration: const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(15))),
              child: JJDialogLoading(
                  color: Colors.black,
                  type: JJDialogLoadingType.circularAnimation,
                  text: text != null ? Text(text.isNotEmpty ? text : Strings.loading.tr) : null)))
      .show(context);
}