当前位置: 首页 > 工具软件 > flutter_hooks > 使用案例 >

flutter打开android界面,Flutter版本1.17,Android原生打开Flutter页面,点back键不能返回...

松铭
2023-12-01

报错信息:

I/flutter: FlutterBoost#onEvent backPressedCallback

I/flutter: FlutterBoost#performBackPressed

E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Bad state: No element

#0 List.last (dart:core-patch/growable_array.dart:224:5)

#1 BoostContainerState.maybePop (package:flutter_boost/container/boost_container.dart:175:42)

#2 BoostContainerState.initState. (package:flutter_boost/container/boost_container.dart:153:32)

#3 BoostContainerState.performBackPressed (package:flutter_boost/container/boost_container.dart:170:25)

#4 ContainerCoordinator._onChannelEvent (package:flutter_boost/container/container_coordinator.dart:114:19)

#5 new ContainerCoordinator. (package:flutter_boost/container/container_coordinator.dart:49:41)

#6 new BoostChannel. (package:flutter_boost/channel/boost_channel.dart:46:14)

#7 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:409:55)

#8 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:377:54)

#9 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:199:33)

#10 _invoke3. (dart:ui/hooks.dart:290:15)

#11 _rootRun (dart:async/zone.dart:1184:13)

#12 _CustomZone.run (dart:async/zone.dart:1077:19)

#13 _CustomZone.runGuarded (dart:async/zone.dart:979:7)

#14 _invoke3 (dart:ui/hooks.dart:289:10)

#15 _dispatchPlatformMessage (dart:ui/hooks.dart:164:5)

 类似资料: