Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

连续show有mask的loading,会看到mask背景闪烁(mask没有过渡效果) #241

Open
Ssiswent opened this issue Jan 15, 2025 · 1 comment

Comments

@Ssiswent
Copy link

Ssiswent commented Jan 15, 2025

Describe the bug
连续show有mask的loading,会看到mask背景闪烁(mask没有过渡效果)
实际场景为:
登录的时候需要连续request多个api,每次request都会show和dismiss loading

Code

void configLoading() {
  EasyLoading.instance
    ..displayDuration = 60.seconds
    ..indicatorType = EasyLoadingIndicatorType.ring
    ..loadingStyle = EasyLoadingStyle.custom
    ..maskType = EasyLoadingMaskType.custom
    // ..animationStyle = EasyLoadingAnimationStyle.scale
    ..maskColor = Colors.blue.withOpacity(0.5)
    ..contentPadding = const EdgeInsets.all(20)
    // ..indicatorWidget = LoadingWidget()
    // ..indicatorSize = 45
    ..radius = 10.0
    // ..progressColor = Colors.yellow
    ..backgroundColor = Color(0xFFD5D66A).withOpacity(0.8)
    ..indicatorColor = Color(0xFFD5D66A)
    ..textColor = Colors.white
    ..textStyle = const TextStyle(
      color: Colors.white,
      fontSize: 15,
      fontWeight: FontWeight.w500,
    )
    // ..maskColor = Colors.blue.withOpacity(0.5)
    ..userInteractions = false
    ..dismissOnTap = false;
  // ..customAnimation = CustomAnimation();
}

Future<void> showLoading() async {
    EasyLoading.show(status: 'Loading...');
    await Future.delayed(Duration(seconds: 1));
    EasyLoading.dismiss();
  }

await showLoading();
    await showLoading();
    await showLoading();

Screenshots

ScreenRecording_01-15-2025.16-48-14_1.MP4
Copy link

Thanks for taking the time to open an issue. I will have a look and answer as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant