Can we open native code written in Swift in a flutter container? I have to open my below native code in the flutter container.
override func viewDidLoad() {
super.viewDidLoad()
let closeButton = UIButton(type: .system)
closeButton.setTitle("Close", for: .normal)
closeButton.frame = CGRect(x: 0, y: 30, width: 80, height: 50)
closeButton.addTarget(self, action: #selector(goBack), for: .touchUpInside)
self.view.addSubview(closeButton)
activityIndicator = UIActivityIndicatorView(style: .gray)
activityIndicator.center = view.center
activityIndicator.hidesWhenStopped = true
view.addSubview(activityIndicator)
self.additionalSafeAreaInsets = UIEdgeInsets(top: 20, left: 0, bottom: 10, right: 0)
UIApplication.shared.statusBarStyle = .lightContent
let url123 = appDelegate.paymentUrl
let url = URL(string: url123)!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true
//setNeedsStatusBarAppearanceUpdate()
//self.webView.navigationDelegate = self
//self.webView.uiDelegate = self
}