mirror of
https://github.com/MAGICGrants/flutter_libsparkmobile.git
synced 2026-01-09 21:17:56 -05:00
flutter create --org com.cypherstack --template=plugin --platforms=android,ios,linux,macos,windows flutter_libsparkmobile
20 lines
658 B
Swift
20 lines
658 B
Swift
import Flutter
|
|
import UIKit
|
|
|
|
public class FlutterLibsparkmobilePlugin: NSObject, FlutterPlugin {
|
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
|
let channel = FlutterMethodChannel(name: "flutter_libsparkmobile", binaryMessenger: registrar.messenger())
|
|
let instance = FlutterLibsparkmobilePlugin()
|
|
registrar.addMethodCallDelegate(instance, channel: channel)
|
|
}
|
|
|
|
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
switch call.method {
|
|
case "getPlatformVersion":
|
|
result("iOS " + UIDevice.current.systemVersion)
|
|
default:
|
|
result(FlutterMethodNotImplemented)
|
|
}
|
|
}
|
|
}
|