flutter_boost icon indicating copy to clipboard operation
flutter_boost copied to clipboard

打开flutter新页面传递实体类失败

Open shenglintang opened this issue 2 years ago • 2 comments

使用以下代码打开新页面 BoostNavigator.instance.push(AppRoutes.FILTER_PAGE, withContainer: true, arguments: {"requestBean":requestBean} );

log日志提示: 2023-06-02 11:54:04.629 19585-19794/com.jqz.jqzproject E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Invalid argument: Instance of 'SaleOrderRequestBean' #0 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:426:7) #1 _NativeRouterApiCodec.writeValue (package:flutter_boost/src/messages.dart:150:13) #2 StandardMessageCodec.writeValue. (package:flutter/src/services/message_codecs.dart:423:9) #3 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13) #4 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:421:13) #5 _NativeRouterApiCodec.writeValue (package:flutter_boost/src/messages.dart:150:13) #6 StandardMessageCodec.writeValue. (package:flutter/src/services/message_codecs.dart:423:9) #7 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13) #8 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:421:13) #9 _NativeRouterApiCodec.writeValue (package:flutter_boost/src/messages.dart:150:13) #10 _NativeRouterApiCodec.writeValue (package:flutter_boost/src/messages.dart:135:7) #11 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:416:9) #12 _NativeRouterApiCodec.writeValue (package:flutter_boost/src/messages.dart:150:13) #13 StandardMessageCodec.encodeMessage (package:flutter/src/services/message_codecs.dart:314:5) #14 BasicMessageChannel.send (package:flutter/src/services/platform_channel.dart:60:71) #15 NativeRouterApi.pushFlutterRoute (package:flutter_boost/src/messages.dart:211:23) #16 FlutterBoostAppState.pushWithResult (package:flutter_boost/src/flutter_boost_app.dart:308:23) #17 BoostNavigator.push (package:flutter_boost/src/boost_navigator.dart:78:24) #18 _SaleOrderHomePageState._buildAppBar. (package:jqz/sale/page/sale_order_home.dart:85:39) #19 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:1005:21) #20 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24) #21 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:613:11) #22 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:298:5) #23 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:232:7) #24 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:563:9) #25 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:94:12) #26 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:139:9) #27 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13) #28 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:137:18) #29 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:123:7) #30 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:445:19) #31 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:425:22) #32 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:329:11) #33 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:380:7) #34 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:344:5) #35 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:302:7) #36 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:285:7) #37 _rootRunUnary (dart:async/zone.dart:1442:13) #38 _CustomZone.runUnary (dart:async/zone.dart:1335:19) #39 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)

flutterboost版本:4.2.2

shenglintang avatar Jun 02 '23 03:06 shenglintang

是否可以支持传递实体类呢

shenglintang avatar Jun 13 '23 06:06 shenglintang

withContainer true不支持传递自定义对象

OnClickListener2048 avatar Aug 11 '23 05:08 OnClickListener2048