Commit 11d7b18b authored by 余玠's avatar 余玠

fixbug

parent e0b1bccd
...@@ -11,8 +11,9 @@ import Foundation ...@@ -11,8 +11,9 @@ import Foundation
class PlatformRouterImp: NSObject, FLBPlatform { class PlatformRouterImp: NSObject, FLBPlatform {
func open(_ url: String, urlParams: [AnyHashable : Any], exts: [AnyHashable : Any], completion: @escaping (Bool) -> Void) { func open(_ url: String, urlParams: [AnyHashable : Any], exts: [AnyHashable : Any], completion: @escaping (Bool) -> Void) {
guard let animated = exts["animated"] as? Bool else{ var animated = false;
return; if exts["animated"] != nil{
animated = exts["animated"] as! Bool;
} }
let vc = FLBFlutterViewContainer.init(); let vc = FLBFlutterViewContainer.init();
vc.setName(url, params: urlParams); vc.setName(url, params: urlParams);
...@@ -21,8 +22,9 @@ class PlatformRouterImp: NSObject, FLBPlatform { ...@@ -21,8 +22,9 @@ class PlatformRouterImp: NSObject, FLBPlatform {
} }
func present(_ url: String, urlParams: [AnyHashable : Any], exts: [AnyHashable : Any], completion: @escaping (Bool) -> Void) { func present(_ url: String, urlParams: [AnyHashable : Any], exts: [AnyHashable : Any], completion: @escaping (Bool) -> Void) {
guard let animated = exts["animated"] as? Bool else{ var animated = false;
return; if exts["animated"] != nil{
animated = exts["animated"] as! Bool;
} }
let vc = FLBFlutterViewContainer.init(); let vc = FLBFlutterViewContainer.init();
vc.setName(url, params: urlParams); vc.setName(url, params: urlParams);
...@@ -32,8 +34,9 @@ class PlatformRouterImp: NSObject, FLBPlatform { ...@@ -32,8 +34,9 @@ class PlatformRouterImp: NSObject, FLBPlatform {
} }
func close(_ uid: String, result: [AnyHashable : Any], exts: [AnyHashable : Any], completion: @escaping (Bool) -> Void) { func close(_ uid: String, result: [AnyHashable : Any], exts: [AnyHashable : Any], completion: @escaping (Bool) -> Void) {
guard let animated = exts["animated"] as? Bool else{ var animated = false;
return; if exts["animated"] != nil{
animated = exts["animated"] as! Bool;
} }
let presentedVC = self.navigationController().presentedViewController; let presentedVC = self.navigationController().presentedViewController;
let vc = presentedVC as? FLBFlutterViewContainer; let vc = presentedVC as? FLBFlutterViewContainer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment