alibaba / alibaba/flutter_boost

flutter_boost与intl一起使用时 白屏

Open
#1,789 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

使用方法:
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate, // Cupertino组件的翻译回调
GlobalMaterialLocalizations.delegate, // Material组件的翻译回调
GlobalWidgetsLocalizations.delegate, // 普通 Widget 的翻译回调
S.delegate, // 应用程序的翻译回调
],
supportedLocales: S.delegate.supportedLocales,
错误原因:
S.delegate
错误日志:
flutter: FlutterBoost#Oops, Failed to update overlay. mode=BoostSpecificEntryRefreshMode.add, BoostContainer(name:/, pages:[BoostPage(name:/, uniqueId:1675850548981_/, arguments:null)])
flutter: NoSuchMethodError: The method 'addEventListener' was called on null.
flutter: Receiver: null
flutter: Tried calling: addEventListener()
BoostChannel.addEventListener (package:flutter_boost/src/boost_channel.dart:32)
flutter: #1 FlutterBoostAppState._addAppLifecycleStateEventListener (package:flutter_boost/src/flutter_boost_app.dart:118)
flutter: #2 FlutterBoostAppState.initState. (package:flutter_boost/src/flutter_boost_app.dart:107)
flutter: #3 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144)
flutter: #4 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1090)
flutter: #5 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998)
flutter: #9 _invoke (dart:ui/hooks.dart:163)
flutter: #10 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259)
flutter: #11 _drawFrame (dart:ui/hooks.dart:126)
flutter: (elided 3 frames from dart:async)
flutter: Another exception was thrown: Instance of 'ErrorSummary'

这两个库是有冲突吗

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported initialization path in lib/flutter_boost/src/flutter_boost_app.dart and the null call in lib/flutter_boost/src/boost_channel.dart. Reproduce the setup using the listed intl localization delegates and inspect why the channel is null during FlutterBoostAppState.initState. Done means identifying whether the two libraries interact incompatibly and resolving the white screen without the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.