Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms

15 lines
522 B

3 years ago
import Flutter
import UIKit
public class SwiftFlutterZxingPlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "flutter_zxing", binaryMessenger: registrar.messenger())
let instance = SwiftFlutterZxingPlugin()
registrar.addMethodCallDelegate(instance, channel: channel)
}
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
result("iOS " + UIDevice.current.systemVersion)
}
}