alibaba / alibaba/flutter_boost
集成调用app生命周期BoostFlutterBinding的时候报错
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Performing hot reload...
Syncing files to device iPhone 8...
lib/main.dart:15:7: Error: The implementation of 'schedulingStrategy' in the non-abstract class 'CustomFlutterBinding' does not conform to its interface.
class CustomFlutterBinding extends WidgetsFlutterBinding with BoostFlutterBinding {}
^^^^^^^^^^^^^^^^^^^^
../../../Flutter_mac/flutter/packages/flutter/lib/src/scheduler/binding.dart:366:22: Context: The return type of the method 'BindingBase with GestureBinding, SchedulerBinding.schedulingStrategy' is 'bool Function({int priority, SchedulerBinding scheduler})', which does not match the return type, 'bool Function({int priority, SchedulerBinding scheduler})', of the overridden method, 'BindingBase with GestureBinding, SchedulerBinding.schedulingStrategy'.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../Flutter_mac/flutter/packages/flutter/lib/src/scheduler/binding.dart').
Change to a subtype of 'bool Function({int priority, SchedulerBinding scheduler})'.
SchedulingStrategy schedulingStrategy = defaultSchedulingStrategy;
^
../../../Flutter_mac/flutter/packages/flutter/lib/src/scheduler/binding.dart:366:22: Context: This is the overridden method ('schedulingStrategy').
SchedulingStrategy schedulingStrategy = defaultSchedulingStrategy;
^
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/main.dart at the CustomFlutterBinding declaration and compare its BoostFlutterBinding integration with the Flutter SDK's scheduler/binding.dart interface shown in the error. Reproduce the issue with hot reload on the iPhone 8 setup, then confirm the binding compiles without the schedulingStrategy interface mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100