cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
146 stars 90 forks source link

LateInitializationError: Field '_progressListener' has not been initialized #21

Closed deakjahn closed 3 years ago

deakjahn commented 3 years ago

dispose() tries to remove _progressListener but this variable is actually never used anywhere. And being marked late, reading from it without ever being initialized will throw. It would be probably safe to remove it completely.

cirediew commented 3 years ago

I have the same problem. Both Android and iOS another_flushbar: ^1.10.17

flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following LateError was thrown while finalizing the widget tree:
flutter: LateInitializationError: Field '_progressListener@17117910' has not been initialized.
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      _FlushbarState._progressListener (package:another_flushbar/flushbar.dart)
flutter: #1      _FlushbarState.dispose (package:another_flushbar/flushbar.dart:357:26)
flutter: #2      StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4721:11)
flutter: #3      _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2022:13)
[✓] Flutter (Channel stable, 2.0.3, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 2.0.3 at /Users/me/development/flutter
    • Framework revision 4d7946a68d (4 weeks ago), 2021-03-18 17:24:33 -0700
    • Engine revision 3459eb2436
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/me/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Users/me/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7199119/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/me/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7199119/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.55.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.21.0

[✓] Connected device (2 available)
    • iPhone 12 Pro Max (mobile) • AF0834E6-F11E-4E7A-82E0-21871146A9B1 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome
      89.0.4389.128

• No issues found!
cmdrootaccess commented 3 years ago

confirmed. pushing new version in 5mins

cmdrootaccess commented 3 years ago

fixed in another_flushbar: ^1.10.18.