Last active
June 16, 2017 16:59
-
-
Save rxlabz/f48764327dfabd67df6bb94451b862d2 to your computer and use it in GitHub Desktop.
This file contains 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
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController; | |
let flutterChannel = FlutterMethodChannel.init(name: "plugin_demo", binaryMessenger: controller); | |
flutterChannel.setMethodCallHandler({ | |
(call: FlutterMethodCall, result: FlutterResult) -> Void in | |
if ("getPlatformVersion" == call.method) { | |
result("iOS " + UIDevice.current.systemVersion); | |
} else { | |
result(FlutterMethodNotImplemented); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment