WIP: working example
This commit is contained in:
parent
c9230bae89
commit
8652a8bf19
|
@ -0,0 +1,8 @@
|
||||||
|
//
|
||||||
|
// Created by rex on 19/03/2019.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLUTTER_UNITY_WIDGET_FLUTTERUNITY_H
|
||||||
|
#define FLUTTER_UNITY_WIDGET_FLUTTERUNITY_H
|
||||||
|
|
||||||
|
#endif //FLUTTER_UNITY_WIDGET_FLUTTERUNITY_H
|
|
@ -0,0 +1,5 @@
|
||||||
|
//
|
||||||
|
// Created by rex on 19/03/2019.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "FlutterUnity.h"
|
|
@ -0,0 +1,8 @@
|
||||||
|
//
|
||||||
|
// Created by rex on 15/03/2019.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLUTTER_UNITY_WIDGET_FLUTTERUNITYNATIVEMODULE_H
|
||||||
|
#define FLUTTER_UNITY_WIDGET_FLUTTERUNITYNATIVEMODULE_H
|
||||||
|
|
||||||
|
#endif //FLUTTER_UNITY_WIDGET_FLUTTERUNITYNATIVEMODULE_H
|
|
@ -0,0 +1,5 @@
|
||||||
|
//
|
||||||
|
// Created by rex on 15/03/2019.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "FlutterUnityNativeModule.h"
|
|
@ -1,14 +0,0 @@
|
||||||
import Flutter
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
public class SwiftFlutterUnityWidgetPlugin: NSObject, FlutterPlugin {
|
|
||||||
public static func register(with registrar: FlutterPluginRegistrar) {
|
|
||||||
let channel = FlutterMethodChannel(name: "flutter_unity_widget", binaryMessenger: registrar.messenger())
|
|
||||||
let instance = SwiftFlutterUnityWidgetPlugin()
|
|
||||||
registrar.addMethodCallDelegate(instance, channel: channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
||||||
result("iOS " + UIDevice.current.systemVersion)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
//
|
||||||
|
// Created by rex on 15/03/2019.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef FLUTTER_UNITY_WIDGET_UNITYUTILS_H
|
||||||
|
#define FLUTTER_UNITY_WIDGET_UNITYUTILS_H
|
||||||
|
|
||||||
|
#endif //FLUTTER_UNITY_WIDGET_UNITYUTILS_H
|
Reference in New Issue