WIP: working example

This commit is contained in:
Rex Raphael 2019-03-26 22:05:53 +01:00
parent c9230bae89
commit 8652a8bf19
7 changed files with 34 additions and 14 deletions

View File

@ -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

View File

@ -0,0 +1,5 @@
//
// Created by rex on 19/03/2019.
//
#include "FlutterUnity.h"

View File

@ -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

View File

@ -0,0 +1,5 @@
//
// Created by rex on 15/03/2019.
//
#include "FlutterUnityNativeModule.h"

View File

@ -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)
}
}

8
ios/Classes/UnityUtils.h Normal file
View File

@ -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

View File