nslogx / nslogx/flutter_easyloading
连续show有mask的loading,会看到mask背景闪烁(mask没有过渡效果)
Open
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 1.3k
- Forks
- 249
- PR merge metrics
- No merged PRs in 30d
Description
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
https://github.com/user-attachments/assets/ca498e66-2d1f-4d62-b1f1-f4079c906a3e
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configLoading and showLoading example, then reproduce the repeated EasyLoading.show and EasyLoading.dismiss sequence. Trace the mask presentation and dismissal path in the repository and check how its animation is configured. Done means consecutive masked loading calls no longer visibly flash the mask background.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100