Error: Getter not found: 'suspending'. case AppLifecycleState.suspending

After upgrading to flutter 1.12 encounter the following error

Compiler message:
/C:/flutter_112/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_lifecycle_state-1.0.0/lib/flutter_lifecycle_state.dart:80:30: Error: Getter not found: 'suspending'.
      case AppLifecycleState.suspending:
                             ^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\flutter_112\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780

According to the error can be seen to be a problem "flutter_lifecycle_state" this package,

Look on pub.dev found this package since June and have not been updated, and I was his last with the updated version,

Well, in that case, only abandoned

Reference: https://stackoverflow.com/questions/59303346/flutter-error-getter-not-found-suspending-case-applifecyclestate-suspendin

This should be the value of this enum inside a "flutter_lifecycle_state" package author used "AppLifecycleState" changed, not backward compatible. .

 

Abandoned flutter_lifecycle_state, use "WidgetsBindingObserver", problem solving

WidgetsBindingObserver on usage, refer to:

https://blog.csdn.net/brycegao321/article/details/86583223

 

 

Published 371 original articles · won praise 32 · views 240 000 +

Guess you like

Origin blog.csdn.net/perfectnihil/article/details/103557467