adding packages
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.appleeducate.getversion">
|
||||
</manifest>
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
package com.appleeducate.getversion
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||
import io.flutter.plugin.common.MethodChannel.Result
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.PluginRegistry.Registrar
|
||||
import com.appleeducate.getversion.BuildConfig;
|
||||
|
||||
class GetVersionPlugin(): MethodCallHandler {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun registerWith(registrar: Registrar): Unit {
|
||||
val channel = MethodChannel(registrar.messenger(), "get_version")
|
||||
channel.setMethodCallHandler(GetVersionPlugin())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: Result): Unit {
|
||||
if (call.method.equals("getPlatformVersion")) {
|
||||
result.success("Android ${android.os.Build.VERSION.RELEASE}")
|
||||
} else {
|
||||
result.notImplemented()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user