alibaba / alibaba/flutter_boost
[Bug]:有没有个比较稳定的版本,总是卡死
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### 请描述遇到的问题,以及您所期望的正确的结果
func pushFlutterRoute(_ options: FlutterBoostRouteOptions!) {
guard let navigationController = topViewController()?.navigationController,let engine = FlutterEngineManager.shared.engine else { return }
let pageName:String = options?.pageName ?? ""
let uniqueId:String = options?.uniqueId ?? pageName
let arguments: [String: Any] = options?.arguments as? [String: Any] ?? [:]
let opaque:Bool = options?.uniqueId as? Bool ?? false
let vc:FBFlutterViewContainer = FBFlutterViewContainer()
vc.setName(pageName, uniqueId: uniqueId, params: arguments, opaque: opaque)
// 是否伴随动画
var animated = true
if let animatedValue = options.arguments["animated"] as? NSNumber {
animated = animatedValue.boolValue
}
// 是否是以 present 的方式打开
let present = (options.arguments["present"] as? Bool ?? false) || !options.opaque
if present {
navigationController.present(vc, animated: animated) {
options.completion?(true)
}
} else {
navigationController.pushViewController(vc, animated: animated)
options.completion?(true)
}
}
### 请说明如何操作会遇到上述问题
func pushFlutterRoute(_ options: FlutterBoostRouteOptions!) {
guard let navigationController = topViewController()?.navigationController,let engine = FlutterEngineManager.shared.engine else { return }
let pageName:String = options?.pageName ?? ""
let uniqueId:String = options?.uniqueId ?? pageName
let arguments: [String: Any] = options?.arguments as? [String: Any] ?? [:]
let opaque:Bool = options?.uniqueId as? Bool ?? false
let vc:FBFlutterViewContainer = FBFlutterViewContainer()
vc.setName(pageName, uniqueId: uniqueId, params: arguments, opaque: opaque)
// 是否伴随动画
var animated = true
if let animatedValue = options.arguments["animated"] as? NSNumber {
animated = animatedValue.boolValue
}
// 是否是以 present 的方式打开
let present = (options.arguments["present"] as? Bool ?? false) || !options.opaque
if present {
navigationController.present(vc, animated: animated) {
options.completion?(true)
}
} else {
navigationController.pushViewController(vc, animated: animated)
options.completion?(true)
}
}
### 在下面填入关键复现代码
func pushFlutterRoute(_ options: FlutterBoostRouteOptions!) {
guard let navigationController = topViewController()?.navigationController,let engine = FlutterEngineManager.shared.engine else { return }
let pageName:String = options?.pageName ?? ""
let uniqueId:String = options?.uniqueId ?? pageName
let arguments: [String: Any] = options?.arguments as? [String: Any] ?? [:]
let opaque:Bool = options?.uniqueId as? Bool ?? false
let vc:FBFlutterViewContainer = FBFlutterViewContainer()
vc.setName(pageName, uniqueId: uniqueId, params: arguments, opaque: opaque)
// 是否伴随动画
var animated = true
if let animatedValue = options.arguments["animated"] as? NSNumber {
animated = animatedValue.boolValue
}
// 是否是以 present 的方式打开
let present = (options.arguments["present"] as? Bool ?? false) || !options.opaque
if present {
navigationController.present(vc, animated: animated) {
options.completion?(true)
}
} else {
navigationController.pushViewController(vc, animated: animated)
options.completion?(true)
}
}
### 复现的平台
iOS
### Flutter SDK版本
3.27.1
### FlutterBoost版本
4.6.5
### 是否延迟初始化FlutterBoost
No
### 解决方案
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the pushFlutterRoute entry point shown in the report and reproduce the freeze on iOS using Flutter SDK 3.27.1 and FlutterBoost 4.6.5. The report does not name a file or test; first establish precise steps and capture the conditions under which navigation hangs. Done means the freeze has a reproducible cause and the relevant behavior is verified against a stable version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, ios
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100