将背景颜色设置为透明但不起作用。使用 EasyLoading 包

Set background color to transparent but doesn't work. Use EasyLoading package

当我在EasyLoading中设置背景色为透明时,显示的不是透明效果,而是黑色。 我试图在源代码中找出答案,但一无所获。 不知道有没有办法把背景色做成透明的,这样就可以把后面的都显示出来了。

更新 解决了这个问题: https://github.com/0xPool/flutter_easyloading/issues/135

void showLoading([String loadingText = 'Loading']) {
  EasyLoading.instance
    ..loadingStyle = EasyLoadingStyle.custom
    ..indicatorType = EasyLoadingIndicatorType.ring
    ..indicatorColor = Colors.transparent
    ..backgroundColor = Colors.transparent
    ..textColor = Colors.transparent
    ..textStyle =
        TextStyle(color: _loadingText, fontSize: 14.sp, fontWeight: FontWeight.bold, fontFamily: 'Helvetica')
    ..textPadding = EdgeInsets.zero
    ..indicatorWidget = Column(
      children: [
        _LoadingRing(
          color: _loadingRingGradient,
        ),
        addVerticalSpace(32)
      ],
    );

  EasyLoading.show(status: loadingText, maskType: EasyLoadingMaskType.none, dismissOnTap: true);
}

您只需在代码 ..boxShadow = <BoxShadow>[] 处添加 BoxShadow。请在下面 link.

找到相关问题

EasyLoading GitHub Open Issue