SwiftFlutterAliCameraPlugin.swift 706 B

123456789101112131415161718
  1. import Flutter
  2. import UIKit
  3. public class SwiftFlutterAliCameraPlugin: NSObject, FlutterPlugin {
  4. public static func register(with registrar: FlutterPluginRegistrar) {
  5. let channel = FlutterMethodChannel(name: "flutter_ali_camera", binaryMessenger: registrar.messenger())
  6. let instance = SwiftFlutterAliCameraPlugin()
  7. registrar.addMethodCallDelegate(instance, channel: channel)
  8. // register view factory
  9. let factory = AliCameraViewFactory(messeneger: registrar.messenger())
  10. registrar.register(factory, withId: "com.i2edu.cameraLib")
  11. }
  12. public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
  13. result("iOS " + UIDevice.current.systemVersion)
  14. }
  15. }