Created
December 1, 2021 01:54
-
-
Save li9ht/2e789790702de762bf69d29425fc8876 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Flutter | |
import FlutterPluginRegistrant | |
class ShowFlutterViewControler: UIViewController{ | |
func showFlutter(){ | |
let flutterEnggine = (UIApplication.shared.delegate as! AppDelegate).flutter_engine | |
let flutterController = FlutterViewController(engine:flutterEnggine,nibName:nil,bundle:nil) | |
//start | |
//if your have scrollview in your flutter app | |
if #available(iOS 13.0, *) { | |
flutterController.isModalInPresentation = false | |
} else { | |
// Fallback on earlier versions | |
} | |
flutterController.modalPresentationStyle = .fullScreen | |
//end | |
self.present(flutterController, animated: true, completion: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment