Skip to content

Toast一直不消失 #104

Description

@paintingStyle

Describe the bug

flutter_easyloading: ^2.2.2 (项目没有升级sdk,使用的旧版本插件)

偶现会出现 Toast,不消失的问题,通畅这个时候页面有点卡,过几秒后页面可以正常操作,但是Toast一直不消失

static Future<void> show(String msg) {
    if (msg == null) {
      return null;
    }
    setTextStyle();
    return EasyLoading.showToast(msg);
  }

  static void setTextStyle() {
    EasyLoading.instance
      ..displayDuration = const Duration(seconds: 2)
      ..loadingStyle = EasyLoadingStyle.custom
      ..progressColor = Colours.app_main
      ..backgroundColor = Colors.black87
      ..indicatorColor = Colours.app_main
      ..indicatorType = EasyLoadingIndicatorType.ring
      ..indicatorSize = 40
      ..textColor = Colours.white
      ..maskColor = Colors.black87
      ..contentPadding = const EdgeInsets.symmetric(
        vertical: 10.0,
        horizontal: 10.0,
      )
      ..radius = 6.0
      ..userInteractions = true
      ..dismissOnTap = false;
  }

Flutter/Dart info
rsf@rsfdeMac-mini ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.2.3 20D91 darwin-x64, locale
zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)

Screenshots
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions