Flutter plugin for mofun flutter video.

MofunFlutterPluginVideoPlugin.kt 855B

1234567891011121314151617181920212223242526
  1. package com.shuangyubang.mofun_flutter_plugin_video
  2. import io.flutter.plugin.common.MethodCall
  3. import io.flutter.plugin.common.MethodChannel
  4. import io.flutter.plugin.common.MethodChannel.MethodCallHandler
  5. import io.flutter.plugin.common.MethodChannel.Result
  6. import io.flutter.plugin.common.PluginRegistry.Registrar
  7. class MofunFlutterPluginVideoPlugin: MethodCallHandler {
  8. companion object {
  9. @JvmStatic
  10. fun registerWith(registrar: Registrar) {
  11. val channel = MethodChannel(registrar.messenger(), "mofun_flutter_plugin_video")
  12. channel.setMethodCallHandler(MofunFlutterPluginVideoPlugin())
  13. }
  14. }
  15. override fun onMethodCall(call: MethodCall, result: Result) {
  16. if (call.method == "getPlatformVersion") {
  17. result.success("Android ${android.os.Build.VERSION.RELEASE}")
  18. } else {
  19. result.notImplemented()
  20. }
  21. }
  22. }