瀏覽代碼

初始化Plugin

ykrank 5 年之前
當前提交
9fc3688a6c
共有 79 個檔案被更改,包括 2079 行新增0 行删除
  1. 71
    0
      .gitignore
  2. 10
    0
      .metadata
  3. 3
    0
      CHANGELOG.md
  4. 1
    0
      LICENSE
  5. 14
    0
      README.md
  6. 8
    0
      android/.gitignore
  7. 44
    0
      android/build.gradle
  8. 1
    0
      android/gradle.properties
  9. 6
    0
      android/gradle/wrapper/gradle-wrapper.properties
  10. 1
    0
      android/settings.gradle
  11. 3
    0
      android/src/main/AndroidManifest.xml
  12. 25
    0
      android/src/main/kotlin/com/shuangyubang/mofun_flutter_plugin_video/MofunFlutterPluginVideoPlugin.kt
  13. 70
    0
      example/.gitignore
  14. 10
    0
      example/.metadata
  15. 16
    0
      example/README.md
  16. 67
    0
      example/android/app/build.gradle
  17. 7
    0
      example/android/app/src/debug/AndroidManifest.xml
  18. 33
    0
      example/android/app/src/main/AndroidManifest.xml
  19. 13
    0
      example/android/app/src/main/kotlin/com/shuangyubang/mofun_flutter_plugin_video_example/MainActivity.kt
  20. 12
    0
      example/android/app/src/main/res/drawable/launch_background.xml
  21. 二進制
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  22. 二進制
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  23. 二進制
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  24. 二進制
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  25. 二進制
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  26. 8
    0
      example/android/app/src/main/res/values/styles.xml
  27. 7
    0
      example/android/app/src/profile/AndroidManifest.xml
  28. 31
    0
      example/android/build.gradle
  29. 1
    0
      example/android/gradle.properties
  30. 6
    0
      example/android/gradle/wrapper/gradle-wrapper.properties
  31. 15
    0
      example/android/settings.gradle
  32. 26
    0
      example/ios/Flutter/AppFrameworkInfo.plist
  33. 1
    0
      example/ios/Flutter/Debug.xcconfig
  34. 1
    0
      example/ios/Flutter/Release.xcconfig
  35. 514
    0
      example/ios/Runner.xcodeproj/project.pbxproj
  36. 7
    0
      example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  37. 93
    0
      example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  38. 7
    0
      example/ios/Runner.xcworkspace/contents.xcworkspacedata
  39. 13
    0
      example/ios/Runner/AppDelegate.swift
  40. 122
    0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  41. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  42. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  43. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  44. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  45. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  46. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  47. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  48. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  49. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  50. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  51. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  52. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  53. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  54. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  55. 二進制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  56. 23
    0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  57. 二進制
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  58. 二進制
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  59. 二進制
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  60. 5
    0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  61. 37
    0
      example/ios/Runner/Base.lproj/LaunchScreen.storyboard
  62. 26
    0
      example/ios/Runner/Base.lproj/Main.storyboard
  63. 45
    0
      example/ios/Runner/Info.plist
  64. 1
    0
      example/ios/Runner/Runner-Bridging-Header.h
  65. 56
    0
      example/lib/main.dart
  66. 153
    0
      example/pubspec.lock
  67. 63
    0
      example/pubspec.yaml
  68. 27
    0
      example/test/widget_test.dart
  69. 36
    0
      ios/.gitignore
  70. 0
    0
      ios/Assets/.gitkeep
  71. 4
    0
      ios/Classes/MofunFlutterPluginVideoPlugin.h
  72. 8
    0
      ios/Classes/MofunFlutterPluginVideoPlugin.m
  73. 14
    0
      ios/Classes/SwiftMofunFlutterPluginVideoPlugin.swift
  74. 21
    0
      ios/mofun_flutter_plugin_video.podspec
  75. 13
    0
      lib/mofun_flutter_plugin_video.dart
  76. 60
    0
      lib/mofun_video_view.dart
  77. 139
    0
      pubspec.lock
  78. 60
    0
      pubspec.yaml
  79. 21
    0
      test/mofun_flutter_plugin_video_test.dart

+ 71
- 0
.gitignore 查看文件

@@ -0,0 +1,71 @@
1
+# Miscellaneous
2
+*.class
3
+*.log
4
+*.pyc
5
+*.swp
6
+.DS_Store
7
+.atom/
8
+.buildlog/
9
+.history
10
+.svn/
11
+
12
+# IntelliJ related
13
+*.iml
14
+*.ipr
15
+*.iws
16
+.idea/
17
+
18
+# Visual Studio Code related
19
+.vscode/
20
+
21
+# Flutter/Dart/Pub related
22
+**/doc/api/
23
+.dart_tool/
24
+.flutter-plugins
25
+.packages
26
+.pub-cache/
27
+.pub/
28
+/build/
29
+
30
+# Android related
31
+**/android/**/gradle-wrapper.jar
32
+**/android/.gradle
33
+**/android/captures/
34
+**/android/gradlew
35
+**/android/gradlew.bat
36
+**/android/local.properties
37
+**/android/**/GeneratedPluginRegistrant.java
38
+
39
+# iOS/XCode related
40
+**/ios/**/*.mode1v3
41
+**/ios/**/*.mode2v3
42
+**/ios/**/*.moved-aside
43
+**/ios/**/*.pbxuser
44
+**/ios/**/*.perspectivev3
45
+**/ios/**/*sync/
46
+**/ios/**/.sconsign.dblite
47
+**/ios/**/.tags*
48
+**/ios/**/.vagrant/
49
+**/ios/**/DerivedData/
50
+**/ios/**/Icon?
51
+**/ios/**/Pods/
52
+**/ios/**/.symlinks/
53
+**/ios/**/profile
54
+**/ios/**/xcuserdata
55
+**/ios/.generated/
56
+**/ios/Flutter/App.framework
57
+**/ios/Flutter/Flutter.framework
58
+**/ios/Flutter/Generated.xcconfig
59
+**/ios/Flutter/app.flx
60
+**/ios/Flutter/app.zip
61
+**/ios/Flutter/flutter_assets/
62
+**/ios/ServiceDefinitions.json
63
+**/ios/Runner/GeneratedPluginRegistrant.*
64
+
65
+# Exceptions to above rules.
66
+!**/ios/**/default.mode1v3
67
+!**/ios/**/default.mode2v3
68
+!**/ios/**/default.pbxuser
69
+!**/ios/**/default.perspectivev3
70
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
71
+*.g.dart

+ 10
- 0
.metadata 查看文件

@@ -0,0 +1,10 @@
1
+# This file tracks properties of this Flutter project.
2
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
3
+#
4
+# This file should be version controlled and should not be manually edited.
5
+
6
+version:
7
+  revision: 0ba67226ee62d6c9d663a6f8410fb4b2f1076046
8
+  channel: dev
9
+
10
+project_type: plugin

+ 3
- 0
CHANGELOG.md 查看文件

@@ -0,0 +1,3 @@
1
+## 0.0.1
2
+
3
+* TODO: Describe initial release.

+ 1
- 0
LICENSE 查看文件

@@ -0,0 +1 @@
1
+TODO: Add your license here.

+ 14
- 0
README.md 查看文件

@@ -0,0 +1,14 @@
1
+# mofun_flutter_plugin_video
2
+
3
+Flutter plugin for mofun video play and edit.
4
+
5
+## Getting Started
6
+
7
+This project is a starting point for a Flutter
8
+[plug-in package](https://flutter.dev/developing-packages/),
9
+a specialized package that includes platform-specific implementation code for
10
+Android and/or iOS.
11
+
12
+For help getting started with Flutter, view our 
13
+[online documentation](https://flutter.dev/docs), which offers tutorials, 
14
+samples, guidance on mobile development, and a full API reference.

+ 8
- 0
android/.gitignore 查看文件

@@ -0,0 +1,8 @@
1
+*.iml
2
+.gradle
3
+/local.properties
4
+/.idea/workspace.xml
5
+/.idea/libraries
6
+.DS_Store
7
+/build
8
+/captures

+ 44
- 0
android/build.gradle 查看文件

@@ -0,0 +1,44 @@
1
+group 'com.shuangyubang.mofun_flutter_plugin_video'
2
+version '1.0-SNAPSHOT'
3
+
4
+buildscript {
5
+    ext.kotlin_version = '1.3.21'
6
+    repositories {
7
+        google()
8
+        jcenter()
9
+    }
10
+
11
+    dependencies {
12
+        classpath 'com.android.tools.build:gradle:3.4.0'
13
+        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
+    }
15
+}
16
+
17
+rootProject.allprojects {
18
+    repositories {
19
+        google()
20
+        jcenter()
21
+    }
22
+}
23
+
24
+apply plugin: 'com.android.library'
25
+apply plugin: 'kotlin-android'
26
+
27
+android {
28
+    compileSdkVersion 28
29
+
30
+    sourceSets {
31
+        main.java.srcDirs += 'src/main/kotlin'
32
+    }
33
+    defaultConfig {
34
+        minSdkVersion 16
35
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
36
+    }
37
+    lintOptions {
38
+        disable 'InvalidPackage'
39
+    }
40
+}
41
+
42
+dependencies {
43
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
44
+}

+ 1
- 0
android/gradle.properties 查看文件

@@ -0,0 +1 @@
1
+org.gradle.jvmargs=-Xmx1536M

+ 6
- 0
android/gradle/wrapper/gradle-wrapper.properties 查看文件

@@ -0,0 +1,6 @@
1
+#Mon Apr 29 22:19:42 CST 2019
2
+distributionBase=GRADLE_USER_HOME
3
+distributionPath=wrapper/dists
4
+zipStoreBase=GRADLE_USER_HOME
5
+zipStorePath=wrapper/dists
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

+ 1
- 0
android/settings.gradle 查看文件

@@ -0,0 +1 @@
1
+rootProject.name = 'mofun_flutter_plugin_video'

+ 3
- 0
android/src/main/AndroidManifest.xml 查看文件

@@ -0,0 +1,3 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+  package="com.shuangyubang.mofun_flutter_plugin_video">
3
+</manifest>

+ 25
- 0
android/src/main/kotlin/com/shuangyubang/mofun_flutter_plugin_video/MofunFlutterPluginVideoPlugin.kt 查看文件

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

+ 70
- 0
example/.gitignore 查看文件

@@ -0,0 +1,70 @@
1
+# Miscellaneous
2
+*.class
3
+*.log
4
+*.pyc
5
+*.swp
6
+.DS_Store
7
+.atom/
8
+.buildlog/
9
+.history
10
+.svn/
11
+
12
+# IntelliJ related
13
+*.iml
14
+*.ipr
15
+*.iws
16
+.idea/
17
+
18
+# Visual Studio Code related
19
+.vscode/
20
+
21
+# Flutter/Dart/Pub related
22
+**/doc/api/
23
+.dart_tool/
24
+.flutter-plugins
25
+.packages
26
+.pub-cache/
27
+.pub/
28
+/build/
29
+
30
+# Android related
31
+**/android/**/gradle-wrapper.jar
32
+**/android/.gradle
33
+**/android/captures/
34
+**/android/gradlew
35
+**/android/gradlew.bat
36
+**/android/local.properties
37
+**/android/**/GeneratedPluginRegistrant.java
38
+
39
+# iOS/XCode related
40
+**/ios/**/*.mode1v3
41
+**/ios/**/*.mode2v3
42
+**/ios/**/*.moved-aside
43
+**/ios/**/*.pbxuser
44
+**/ios/**/*.perspectivev3
45
+**/ios/**/*sync/
46
+**/ios/**/.sconsign.dblite
47
+**/ios/**/.tags*
48
+**/ios/**/.vagrant/
49
+**/ios/**/DerivedData/
50
+**/ios/**/Icon?
51
+**/ios/**/Pods/
52
+**/ios/**/.symlinks/
53
+**/ios/**/profile
54
+**/ios/**/xcuserdata
55
+**/ios/.generated/
56
+**/ios/Flutter/App.framework
57
+**/ios/Flutter/Flutter.framework
58
+**/ios/Flutter/Generated.xcconfig
59
+**/ios/Flutter/app.flx
60
+**/ios/Flutter/app.zip
61
+**/ios/Flutter/flutter_assets/
62
+**/ios/ServiceDefinitions.json
63
+**/ios/Runner/GeneratedPluginRegistrant.*
64
+
65
+# Exceptions to above rules.
66
+!**/ios/**/default.mode1v3
67
+!**/ios/**/default.mode2v3
68
+!**/ios/**/default.pbxuser
69
+!**/ios/**/default.perspectivev3
70
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

+ 10
- 0
example/.metadata 查看文件

@@ -0,0 +1,10 @@
1
+# This file tracks properties of this Flutter project.
2
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
3
+#
4
+# This file should be version controlled and should not be manually edited.
5
+
6
+version:
7
+  revision: 0ba67226ee62d6c9d663a6f8410fb4b2f1076046
8
+  channel: dev
9
+
10
+project_type: app

+ 16
- 0
example/README.md 查看文件

@@ -0,0 +1,16 @@
1
+# mofun_flutter_plugin_video_example
2
+
3
+Demonstrates how to use the mofun_flutter_plugin_video plugin.
4
+
5
+## Getting Started
6
+
7
+This project is a starting point for a Flutter application.
8
+
9
+A few resources to get you started if this is your first Flutter project:
10
+
11
+- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12
+- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13
+
14
+For help getting started with Flutter, view our 
15
+[online documentation](https://flutter.dev/docs), which offers tutorials, 
16
+samples, guidance on mobile development, and a full API reference.

+ 67
- 0
example/android/app/build.gradle 查看文件

@@ -0,0 +1,67 @@
1
+def localProperties = new Properties()
2
+def localPropertiesFile = rootProject.file('local.properties')
3
+if (localPropertiesFile.exists()) {
4
+    localPropertiesFile.withReader('UTF-8') { reader ->
5
+        localProperties.load(reader)
6
+    }
7
+}
8
+
9
+def flutterRoot = localProperties.getProperty('flutter.sdk')
10
+if (flutterRoot == null) {
11
+    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12
+}
13
+
14
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15
+if (flutterVersionCode == null) {
16
+    flutterVersionCode = '1'
17
+}
18
+
19
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
20
+if (flutterVersionName == null) {
21
+    flutterVersionName = '1.0'
22
+}
23
+
24
+apply plugin: 'com.android.application'
25
+apply plugin: 'kotlin-android'
26
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27
+
28
+android {
29
+    compileSdkVersion 28
30
+
31
+    sourceSets {
32
+        main.java.srcDirs += 'src/main/kotlin'
33
+    }
34
+
35
+    lintOptions {
36
+        disable 'InvalidPackage'
37
+    }
38
+
39
+    defaultConfig {
40
+        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41
+        applicationId "com.shuangyubang.mofun_flutter_plugin_video_example"
42
+        minSdkVersion 16
43
+        targetSdkVersion 28
44
+        versionCode flutterVersionCode.toInteger()
45
+        versionName flutterVersionName
46
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
47
+    }
48
+
49
+    buildTypes {
50
+        release {
51
+            // TODO: Add your own signing config for the release build.
52
+            // Signing with the debug keys for now, so `flutter run --release` works.
53
+            signingConfig signingConfigs.debug
54
+        }
55
+    }
56
+}
57
+
58
+flutter {
59
+    source '../..'
60
+}
61
+
62
+dependencies {
63
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64
+    testImplementation 'junit:junit:4.12'
65
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
66
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
67
+}

+ 7
- 0
example/android/app/src/debug/AndroidManifest.xml 查看文件

@@ -0,0 +1,7 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.shuangyubang.mofun_flutter_plugin_video_example">
3
+    <!-- Flutter needs it to communicate with the running application
4
+         to allow setting breakpoints, to provide hot reload, etc.
5
+    -->
6
+    <uses-permission android:name="android.permission.INTERNET"/>
7
+</manifest>

+ 33
- 0
example/android/app/src/main/AndroidManifest.xml 查看文件

@@ -0,0 +1,33 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.shuangyubang.mofun_flutter_plugin_video_example">
3
+
4
+    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
5
+         calls FlutterMain.startInitialization(this); in its onCreate method.
6
+         In most cases you can leave this as-is, but you if you want to provide
7
+         additional functionality it is fine to subclass or reimplement
8
+         FlutterApplication and put your custom class here. -->
9
+    <application
10
+        android:name="io.flutter.app.FlutterApplication"
11
+        android:label="mofun_flutter_plugin_video_example"
12
+        android:icon="@mipmap/ic_launcher">
13
+        <activity
14
+            android:name=".MainActivity"
15
+            android:launchMode="singleTop"
16
+            android:theme="@style/LaunchTheme"
17
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
18
+            android:hardwareAccelerated="true"
19
+            android:windowSoftInputMode="adjustResize">
20
+            <!-- This keeps the window background of the activity showing
21
+                 until Flutter renders its first frame. It can be removed if
22
+                 there is no splash screen (such as the default splash screen
23
+                 defined in @style/LaunchTheme). -->
24
+            <meta-data
25
+                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
26
+                android:value="true" />
27
+            <intent-filter>
28
+                <action android:name="android.intent.action.MAIN"/>
29
+                <category android:name="android.intent.category.LAUNCHER"/>
30
+            </intent-filter>
31
+        </activity>
32
+    </application>
33
+</manifest>

+ 13
- 0
example/android/app/src/main/kotlin/com/shuangyubang/mofun_flutter_plugin_video_example/MainActivity.kt 查看文件

@@ -0,0 +1,13 @@
1
+package com.shuangyubang.mofun_flutter_plugin_video_example
2
+
3
+import android.os.Bundle
4
+
5
+import io.flutter.app.FlutterActivity
6
+import io.flutter.plugins.GeneratedPluginRegistrant
7
+
8
+class MainActivity: FlutterActivity() {
9
+  override fun onCreate(savedInstanceState: Bundle?) {
10
+    super.onCreate(savedInstanceState)
11
+    GeneratedPluginRegistrant.registerWith(this)
12
+  }
13
+}

+ 12
- 0
example/android/app/src/main/res/drawable/launch_background.xml 查看文件

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Modify this file to customize your launch splash screen -->
3
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
+    <item android:drawable="@android:color/white" />
5
+
6
+    <!-- You can insert your own image assets here -->
7
+    <!-- <item>
8
+        <bitmap
9
+            android:gravity="center"
10
+            android:src="@mipmap/launch_image" />
11
+    </item> -->
12
+</layer-list>

二進制
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png 查看文件


二進制
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png 查看文件


二進制
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png 查看文件


二進制
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 查看文件


二進制
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 查看文件


+ 8
- 0
example/android/app/src/main/res/values/styles.xml 查看文件

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<resources>
3
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
4
+        <!-- Show a splash screen on the activity. Automatically removed when
5
+             Flutter draws its first frame -->
6
+        <item name="android:windowBackground">@drawable/launch_background</item>
7
+    </style>
8
+</resources>

+ 7
- 0
example/android/app/src/profile/AndroidManifest.xml 查看文件

@@ -0,0 +1,7 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.shuangyubang.mofun_flutter_plugin_video_example">
3
+    <!-- Flutter needs it to communicate with the running application
4
+         to allow setting breakpoints, to provide hot reload, etc.
5
+    -->
6
+    <uses-permission android:name="android.permission.INTERNET"/>
7
+</manifest>

+ 31
- 0
example/android/build.gradle 查看文件

@@ -0,0 +1,31 @@
1
+buildscript {
2
+    ext.kotlin_version = '1.2.71'
3
+    repositories {
4
+        google()
5
+        jcenter()
6
+    }
7
+
8
+    dependencies {
9
+        classpath 'com.android.tools.build:gradle:3.2.1'
10
+        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11
+    }
12
+}
13
+
14
+allprojects {
15
+    repositories {
16
+        google()
17
+        jcenter()
18
+    }
19
+}
20
+
21
+rootProject.buildDir = '../build'
22
+subprojects {
23
+    project.buildDir = "${rootProject.buildDir}/${project.name}"
24
+}
25
+subprojects {
26
+    project.evaluationDependsOn(':app')
27
+}
28
+
29
+task clean(type: Delete) {
30
+    delete rootProject.buildDir
31
+}

+ 1
- 0
example/android/gradle.properties 查看文件

@@ -0,0 +1 @@
1
+org.gradle.jvmargs=-Xmx1536M

+ 6
- 0
example/android/gradle/wrapper/gradle-wrapper.properties 查看文件

@@ -0,0 +1,6 @@
1
+#Fri Jun 23 08:50:38 CEST 2017
2
+distributionBase=GRADLE_USER_HOME
3
+distributionPath=wrapper/dists
4
+zipStoreBase=GRADLE_USER_HOME
5
+zipStorePath=wrapper/dists
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

+ 15
- 0
example/android/settings.gradle 查看文件

@@ -0,0 +1,15 @@
1
+include ':app'
2
+
3
+def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4
+
5
+def plugins = new Properties()
6
+def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7
+if (pluginsFile.exists()) {
8
+    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9
+}
10
+
11
+plugins.each { name, path ->
12
+    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13
+    include ":$name"
14
+    project(":$name").projectDir = pluginDirectory
15
+}

+ 26
- 0
example/ios/Flutter/AppFrameworkInfo.plist 查看文件

@@ -0,0 +1,26 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+  <key>CFBundleDevelopmentRegion</key>
6
+  <string>en</string>
7
+  <key>CFBundleExecutable</key>
8
+  <string>App</string>
9
+  <key>CFBundleIdentifier</key>
10
+  <string>io.flutter.flutter.app</string>
11
+  <key>CFBundleInfoDictionaryVersion</key>
12
+  <string>6.0</string>
13
+  <key>CFBundleName</key>
14
+  <string>App</string>
15
+  <key>CFBundlePackageType</key>
16
+  <string>FMWK</string>
17
+  <key>CFBundleShortVersionString</key>
18
+  <string>1.0</string>
19
+  <key>CFBundleSignature</key>
20
+  <string>????</string>
21
+  <key>CFBundleVersion</key>
22
+  <string>1.0</string>
23
+  <key>MinimumOSVersion</key>
24
+  <string>8.0</string>
25
+</dict>
26
+</plist>

+ 1
- 0
example/ios/Flutter/Debug.xcconfig 查看文件

@@ -0,0 +1 @@
1
+#include "Generated.xcconfig"

+ 1
- 0
example/ios/Flutter/Release.xcconfig 查看文件

@@ -0,0 +1 @@
1
+#include "Generated.xcconfig"

+ 514
- 0
example/ios/Runner.xcodeproj/project.pbxproj 查看文件

@@ -0,0 +1,514 @@
1
+// !$*UTF8*$!
2
+{
3
+	archiveVersion = 1;
4
+	classes = {
5
+	};
6
+	objectVersion = 46;
7
+	objects = {
8
+
9
+/* Begin PBXBuildFile section */
10
+		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11
+		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12
+		3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13
+		3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14
+		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15
+		9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16
+		9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17
+		9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18
+		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
19
+		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
20
+		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
21
+/* End PBXBuildFile section */
22
+
23
+/* Begin PBXCopyFilesBuildPhase section */
24
+		9705A1C41CF9048500538489 /* Embed Frameworks */ = {
25
+			isa = PBXCopyFilesBuildPhase;
26
+			buildActionMask = 2147483647;
27
+			dstPath = "";
28
+			dstSubfolderSpec = 10;
29
+			files = (
30
+				3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
31
+				9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
32
+			);
33
+			name = "Embed Frameworks";
34
+			runOnlyForDeploymentPostprocessing = 0;
35
+		};
36
+/* End PBXCopyFilesBuildPhase section */
37
+
38
+/* Begin PBXFileReference section */
39
+		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
40
+		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
41
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
42
+		3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
43
+		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
44
+		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
45
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
46
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
47
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
48
+		9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
49
+		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
50
+		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
51
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
52
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
53
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
54
+/* End PBXFileReference section */
55
+
56
+/* Begin PBXFrameworksBuildPhase section */
57
+		97C146EB1CF9000F007C117D /* Frameworks */ = {
58
+			isa = PBXFrameworksBuildPhase;
59
+			buildActionMask = 2147483647;
60
+			files = (
61
+				9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
62
+				3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
63
+			);
64
+			runOnlyForDeploymentPostprocessing = 0;
65
+		};
66
+/* End PBXFrameworksBuildPhase section */
67
+
68
+/* Begin PBXGroup section */
69
+		9740EEB11CF90186004384FC /* Flutter */ = {
70
+			isa = PBXGroup;
71
+			children = (
72
+				3B80C3931E831B6300D905FE /* App.framework */,
73
+				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
74
+				9740EEBA1CF902C7004384FC /* Flutter.framework */,
75
+				9740EEB21CF90195004384FC /* Debug.xcconfig */,
76
+				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
77
+				9740EEB31CF90195004384FC /* Generated.xcconfig */,
78
+			);
79
+			name = Flutter;
80
+			sourceTree = "<group>";
81
+		};
82
+		97C146E51CF9000F007C117D = {
83
+			isa = PBXGroup;
84
+			children = (
85
+				9740EEB11CF90186004384FC /* Flutter */,
86
+				97C146F01CF9000F007C117D /* Runner */,
87
+				97C146EF1CF9000F007C117D /* Products */,
88
+			);
89
+			sourceTree = "<group>";
90
+		};
91
+		97C146EF1CF9000F007C117D /* Products */ = {
92
+			isa = PBXGroup;
93
+			children = (
94
+				97C146EE1CF9000F007C117D /* Runner.app */,
95
+			);
96
+			name = Products;
97
+			sourceTree = "<group>";
98
+		};
99
+		97C146F01CF9000F007C117D /* Runner */ = {
100
+			isa = PBXGroup;
101
+			children = (
102
+				97C146FA1CF9000F007C117D /* Main.storyboard */,
103
+				97C146FD1CF9000F007C117D /* Assets.xcassets */,
104
+				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
105
+				97C147021CF9000F007C117D /* Info.plist */,
106
+				97C146F11CF9000F007C117D /* Supporting Files */,
107
+				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
108
+				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
109
+				74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
110
+				74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
111
+			);
112
+			path = Runner;
113
+			sourceTree = "<group>";
114
+		};
115
+		97C146F11CF9000F007C117D /* Supporting Files */ = {
116
+			isa = PBXGroup;
117
+			children = (
118
+			);
119
+			name = "Supporting Files";
120
+			sourceTree = "<group>";
121
+		};
122
+/* End PBXGroup section */
123
+
124
+/* Begin PBXNativeTarget section */
125
+		97C146ED1CF9000F007C117D /* Runner */ = {
126
+			isa = PBXNativeTarget;
127
+			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
128
+			buildPhases = (
129
+				9740EEB61CF901F6004384FC /* Run Script */,
130
+				97C146EA1CF9000F007C117D /* Sources */,
131
+				97C146EB1CF9000F007C117D /* Frameworks */,
132
+				97C146EC1CF9000F007C117D /* Resources */,
133
+				9705A1C41CF9048500538489 /* Embed Frameworks */,
134
+				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
135
+			);
136
+			buildRules = (
137
+			);
138
+			dependencies = (
139
+			);
140
+			name = Runner;
141
+			productName = Runner;
142
+			productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
143
+			productType = "com.apple.product-type.application";
144
+		};
145
+/* End PBXNativeTarget section */
146
+
147
+/* Begin PBXProject section */
148
+		97C146E61CF9000F007C117D /* Project object */ = {
149
+			isa = PBXProject;
150
+			attributes = {
151
+				LastUpgradeCheck = 0910;
152
+				ORGANIZATIONNAME = "The Chromium Authors";
153
+				TargetAttributes = {
154
+					97C146ED1CF9000F007C117D = {
155
+						CreatedOnToolsVersion = 7.3.1;
156
+						LastSwiftMigration = 0910;
157
+					};
158
+				};
159
+			};
160
+			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
161
+			compatibilityVersion = "Xcode 3.2";
162
+			developmentRegion = English;
163
+			hasScannedForEncodings = 0;
164
+			knownRegions = (
165
+				en,
166
+				Base,
167
+			);
168
+			mainGroup = 97C146E51CF9000F007C117D;
169
+			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
170
+			projectDirPath = "";
171
+			projectRoot = "";
172
+			targets = (
173
+				97C146ED1CF9000F007C117D /* Runner */,
174
+			);
175
+		};
176
+/* End PBXProject section */
177
+
178
+/* Begin PBXResourcesBuildPhase section */
179
+		97C146EC1CF9000F007C117D /* Resources */ = {
180
+			isa = PBXResourcesBuildPhase;
181
+			buildActionMask = 2147483647;
182
+			files = (
183
+				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
184
+				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
185
+				9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
186
+				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
187
+				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
188
+			);
189
+			runOnlyForDeploymentPostprocessing = 0;
190
+		};
191
+/* End PBXResourcesBuildPhase section */
192
+
193
+/* Begin PBXShellScriptBuildPhase section */
194
+		3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
195
+			isa = PBXShellScriptBuildPhase;
196
+			buildActionMask = 2147483647;
197
+			files = (
198
+			);
199
+			inputPaths = (
200
+			);
201
+			name = "Thin Binary";
202
+			outputPaths = (
203
+			);
204
+			runOnlyForDeploymentPostprocessing = 0;
205
+			shellPath = /bin/sh;
206
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
207
+		};
208
+		9740EEB61CF901F6004384FC /* Run Script */ = {
209
+			isa = PBXShellScriptBuildPhase;
210
+			buildActionMask = 2147483647;
211
+			files = (
212
+			);
213
+			inputPaths = (
214
+			);
215
+			name = "Run Script";
216
+			outputPaths = (
217
+			);
218
+			runOnlyForDeploymentPostprocessing = 0;
219
+			shellPath = /bin/sh;
220
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
221
+		};
222
+/* End PBXShellScriptBuildPhase section */
223
+
224
+/* Begin PBXSourcesBuildPhase section */
225
+		97C146EA1CF9000F007C117D /* Sources */ = {
226
+			isa = PBXSourcesBuildPhase;
227
+			buildActionMask = 2147483647;
228
+			files = (
229
+				74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
230
+				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
231
+			);
232
+			runOnlyForDeploymentPostprocessing = 0;
233
+		};
234
+/* End PBXSourcesBuildPhase section */
235
+
236
+/* Begin PBXVariantGroup section */
237
+		97C146FA1CF9000F007C117D /* Main.storyboard */ = {
238
+			isa = PBXVariantGroup;
239
+			children = (
240
+				97C146FB1CF9000F007C117D /* Base */,
241
+			);
242
+			name = Main.storyboard;
243
+			sourceTree = "<group>";
244
+		};
245
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
246
+			isa = PBXVariantGroup;
247
+			children = (
248
+				97C147001CF9000F007C117D /* Base */,
249
+			);
250
+			name = LaunchScreen.storyboard;
251
+			sourceTree = "<group>";
252
+		};
253
+/* End PBXVariantGroup section */
254
+
255
+/* Begin XCBuildConfiguration section */
256
+		249021D3217E4FDB00AE95B9 /* Profile */ = {
257
+			isa = XCBuildConfiguration;
258
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
259
+			buildSettings = {
260
+				ALWAYS_SEARCH_USER_PATHS = NO;
261
+				CLANG_ANALYZER_NONNULL = YES;
262
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
263
+				CLANG_CXX_LIBRARY = "libc++";
264
+				CLANG_ENABLE_MODULES = YES;
265
+				CLANG_ENABLE_OBJC_ARC = YES;
266
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
267
+				CLANG_WARN_BOOL_CONVERSION = YES;
268
+				CLANG_WARN_COMMA = YES;
269
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
270
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
271
+				CLANG_WARN_EMPTY_BODY = YES;
272
+				CLANG_WARN_ENUM_CONVERSION = YES;
273
+				CLANG_WARN_INFINITE_RECURSION = YES;
274
+				CLANG_WARN_INT_CONVERSION = YES;
275
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
276
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
280
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
281
+				CLANG_WARN_UNREACHABLE_CODE = YES;
282
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284
+				COPY_PHASE_STRIP = NO;
285
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286
+				ENABLE_NS_ASSERTIONS = NO;
287
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
288
+				GCC_C_LANGUAGE_STANDARD = gnu99;
289
+				GCC_NO_COMMON_BLOCKS = YES;
290
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
293
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294
+				GCC_WARN_UNUSED_FUNCTION = YES;
295
+				GCC_WARN_UNUSED_VARIABLE = YES;
296
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297
+				MTL_ENABLE_DEBUG_INFO = NO;
298
+				SDKROOT = iphoneos;
299
+				TARGETED_DEVICE_FAMILY = "1,2";
300
+				VALIDATE_PRODUCT = YES;
301
+			};
302
+			name = Profile;
303
+		};
304
+		249021D4217E4FDB00AE95B9 /* Profile */ = {
305
+			isa = XCBuildConfiguration;
306
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
307
+			buildSettings = {
308
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
309
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
310
+				DEVELOPMENT_TEAM = S8QB4VV633;
311
+				ENABLE_BITCODE = NO;
312
+				FRAMEWORK_SEARCH_PATHS = (
313
+					"$(inherited)",
314
+					"$(PROJECT_DIR)/Flutter",
315
+				);
316
+				INFOPLIST_FILE = Runner/Info.plist;
317
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
318
+				LIBRARY_SEARCH_PATHS = (
319
+					"$(inherited)",
320
+					"$(PROJECT_DIR)/Flutter",
321
+				);
322
+				PRODUCT_BUNDLE_IDENTIFIER = com.shuangyubang.mofunFlutterPluginVideoExample;
323
+				PRODUCT_NAME = "$(TARGET_NAME)";
324
+				SWIFT_VERSION = 4.0;
325
+				VERSIONING_SYSTEM = "apple-generic";
326
+			};
327
+			name = Profile;
328
+		};
329
+		97C147031CF9000F007C117D /* Debug */ = {
330
+			isa = XCBuildConfiguration;
331
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
332
+			buildSettings = {
333
+				ALWAYS_SEARCH_USER_PATHS = NO;
334
+				CLANG_ANALYZER_NONNULL = YES;
335
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
336
+				CLANG_CXX_LIBRARY = "libc++";
337
+				CLANG_ENABLE_MODULES = YES;
338
+				CLANG_ENABLE_OBJC_ARC = YES;
339
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
340
+				CLANG_WARN_BOOL_CONVERSION = YES;
341
+				CLANG_WARN_COMMA = YES;
342
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
343
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
344
+				CLANG_WARN_EMPTY_BODY = YES;
345
+				CLANG_WARN_ENUM_CONVERSION = YES;
346
+				CLANG_WARN_INFINITE_RECURSION = YES;
347
+				CLANG_WARN_INT_CONVERSION = YES;
348
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
349
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
350
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
351
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
352
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
353
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
354
+				CLANG_WARN_UNREACHABLE_CODE = YES;
355
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
356
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
357
+				COPY_PHASE_STRIP = NO;
358
+				DEBUG_INFORMATION_FORMAT = dwarf;
359
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
360
+				ENABLE_TESTABILITY = YES;
361
+				GCC_C_LANGUAGE_STANDARD = gnu99;
362
+				GCC_DYNAMIC_NO_PIC = NO;
363
+				GCC_NO_COMMON_BLOCKS = YES;
364
+				GCC_OPTIMIZATION_LEVEL = 0;
365
+				GCC_PREPROCESSOR_DEFINITIONS = (
366
+					"DEBUG=1",
367
+					"$(inherited)",
368
+				);
369
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
370
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
371
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
372
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
373
+				GCC_WARN_UNUSED_FUNCTION = YES;
374
+				GCC_WARN_UNUSED_VARIABLE = YES;
375
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
376
+				MTL_ENABLE_DEBUG_INFO = YES;
377
+				ONLY_ACTIVE_ARCH = YES;
378
+				SDKROOT = iphoneos;
379
+				TARGETED_DEVICE_FAMILY = "1,2";
380
+			};
381
+			name = Debug;
382
+		};
383
+		97C147041CF9000F007C117D /* Release */ = {
384
+			isa = XCBuildConfiguration;
385
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
386
+			buildSettings = {
387
+				ALWAYS_SEARCH_USER_PATHS = NO;
388
+				CLANG_ANALYZER_NONNULL = YES;
389
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
390
+				CLANG_CXX_LIBRARY = "libc++";
391
+				CLANG_ENABLE_MODULES = YES;
392
+				CLANG_ENABLE_OBJC_ARC = YES;
393
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
394
+				CLANG_WARN_BOOL_CONVERSION = YES;
395
+				CLANG_WARN_COMMA = YES;
396
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
397
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398
+				CLANG_WARN_EMPTY_BODY = YES;
399
+				CLANG_WARN_ENUM_CONVERSION = YES;
400
+				CLANG_WARN_INFINITE_RECURSION = YES;
401
+				CLANG_WARN_INT_CONVERSION = YES;
402
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
403
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
404
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
405
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
406
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
407
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
408
+				CLANG_WARN_UNREACHABLE_CODE = YES;
409
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
410
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
411
+				COPY_PHASE_STRIP = NO;
412
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
413
+				ENABLE_NS_ASSERTIONS = NO;
414
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
415
+				GCC_C_LANGUAGE_STANDARD = gnu99;
416
+				GCC_NO_COMMON_BLOCKS = YES;
417
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
418
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
419
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
420
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
421
+				GCC_WARN_UNUSED_FUNCTION = YES;
422
+				GCC_WARN_UNUSED_VARIABLE = YES;
423
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
424
+				MTL_ENABLE_DEBUG_INFO = NO;
425
+				SDKROOT = iphoneos;
426
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
427
+				TARGETED_DEVICE_FAMILY = "1,2";
428
+				VALIDATE_PRODUCT = YES;
429
+			};
430
+			name = Release;
431
+		};
432
+		97C147061CF9000F007C117D /* Debug */ = {
433
+			isa = XCBuildConfiguration;
434
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
435
+			buildSettings = {
436
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
437
+				CLANG_ENABLE_MODULES = YES;
438
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
439
+				ENABLE_BITCODE = NO;
440
+				FRAMEWORK_SEARCH_PATHS = (
441
+					"$(inherited)",
442
+					"$(PROJECT_DIR)/Flutter",
443
+				);
444
+				INFOPLIST_FILE = Runner/Info.plist;
445
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
446
+				LIBRARY_SEARCH_PATHS = (
447
+					"$(inherited)",
448
+					"$(PROJECT_DIR)/Flutter",
449
+				);
450
+				PRODUCT_BUNDLE_IDENTIFIER = com.shuangyubang.mofunFlutterPluginVideoExample;
451
+				PRODUCT_NAME = "$(TARGET_NAME)";
452
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
453
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
454
+				SWIFT_SWIFT3_OBJC_INFERENCE = On;
455
+				SWIFT_VERSION = 4.0;
456
+				VERSIONING_SYSTEM = "apple-generic";
457
+			};
458
+			name = Debug;
459
+		};
460
+		97C147071CF9000F007C117D /* Release */ = {
461
+			isa = XCBuildConfiguration;
462
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
463
+			buildSettings = {
464
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
465
+				CLANG_ENABLE_MODULES = YES;
466
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
467
+				ENABLE_BITCODE = NO;
468
+				FRAMEWORK_SEARCH_PATHS = (
469
+					"$(inherited)",
470
+					"$(PROJECT_DIR)/Flutter",
471
+				);
472
+				INFOPLIST_FILE = Runner/Info.plist;
473
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
474
+				LIBRARY_SEARCH_PATHS = (
475
+					"$(inherited)",
476
+					"$(PROJECT_DIR)/Flutter",
477
+				);
478
+				PRODUCT_BUNDLE_IDENTIFIER = com.shuangyubang.mofunFlutterPluginVideoExample;
479
+				PRODUCT_NAME = "$(TARGET_NAME)";
480
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
481
+				SWIFT_SWIFT3_OBJC_INFERENCE = On;
482
+				SWIFT_VERSION = 4.0;
483
+				VERSIONING_SYSTEM = "apple-generic";
484
+			};
485
+			name = Release;
486
+		};
487
+/* End XCBuildConfiguration section */
488
+
489
+/* Begin XCConfigurationList section */
490
+		97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
491
+			isa = XCConfigurationList;
492
+			buildConfigurations = (
493
+				97C147031CF9000F007C117D /* Debug */,
494
+				97C147041CF9000F007C117D /* Release */,
495
+				249021D3217E4FDB00AE95B9 /* Profile */,
496
+			);
497
+			defaultConfigurationIsVisible = 0;
498
+			defaultConfigurationName = Release;
499
+		};
500
+		97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
501
+			isa = XCConfigurationList;
502
+			buildConfigurations = (
503
+				97C147061CF9000F007C117D /* Debug */,
504
+				97C147071CF9000F007C117D /* Release */,
505
+				249021D4217E4FDB00AE95B9 /* Profile */,
506
+			);
507
+			defaultConfigurationIsVisible = 0;
508
+			defaultConfigurationName = Release;
509
+		};
510
+/* End XCConfigurationList section */
511
+
512
+	};
513
+	rootObject = 97C146E61CF9000F007C117D /* Project object */;
514
+}

+ 7
- 0
example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata 查看文件

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:Runner.xcodeproj">
6
+   </FileRef>
7
+</Workspace>

+ 93
- 0
example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme 查看文件

@@ -0,0 +1,93 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+   LastUpgradeVersion = "0910"
4
+   version = "1.3">
5
+   <BuildAction
6
+      parallelizeBuildables = "YES"
7
+      buildImplicitDependencies = "YES">
8
+      <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18
+               BuildableName = "Runner.app"
19
+               BlueprintName = "Runner"
20
+               ReferencedContainer = "container:Runner.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+      </BuildActionEntries>
24
+   </BuildAction>
25
+   <TestAction
26
+      buildConfiguration = "Debug"
27
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+      language = ""
30
+      shouldUseLaunchSchemeArgsEnv = "YES">
31
+      <Testables>
32
+      </Testables>
33
+      <MacroExpansion>
34
+         <BuildableReference
35
+            BuildableIdentifier = "primary"
36
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
37
+            BuildableName = "Runner.app"
38
+            BlueprintName = "Runner"
39
+            ReferencedContainer = "container:Runner.xcodeproj">
40
+         </BuildableReference>
41
+      </MacroExpansion>
42
+      <AdditionalOptions>
43
+      </AdditionalOptions>
44
+   </TestAction>
45
+   <LaunchAction
46
+      buildConfiguration = "Debug"
47
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
48
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49
+      language = ""
50
+      launchStyle = "0"
51
+      useCustomWorkingDirectory = "NO"
52
+      ignoresPersistentStateOnLaunch = "NO"
53
+      debugDocumentVersioning = "YES"
54
+      debugServiceExtension = "internal"
55
+      allowLocationSimulation = "YES">
56
+      <BuildableProductRunnable
57
+         runnableDebuggingMode = "0">
58
+         <BuildableReference
59
+            BuildableIdentifier = "primary"
60
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
61
+            BuildableName = "Runner.app"
62
+            BlueprintName = "Runner"
63
+            ReferencedContainer = "container:Runner.xcodeproj">
64
+         </BuildableReference>
65
+      </BuildableProductRunnable>
66
+      <AdditionalOptions>
67
+      </AdditionalOptions>
68
+   </LaunchAction>
69
+   <ProfileAction
70
+      buildConfiguration = "Profile"
71
+      shouldUseLaunchSchemeArgsEnv = "YES"
72
+      savedToolIdentifier = ""
73
+      useCustomWorkingDirectory = "NO"
74
+      debugDocumentVersioning = "YES">
75
+      <BuildableProductRunnable
76
+         runnableDebuggingMode = "0">
77
+         <BuildableReference
78
+            BuildableIdentifier = "primary"
79
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
80
+            BuildableName = "Runner.app"
81
+            BlueprintName = "Runner"
82
+            ReferencedContainer = "container:Runner.xcodeproj">
83
+         </BuildableReference>
84
+      </BuildableProductRunnable>
85
+   </ProfileAction>
86
+   <AnalyzeAction
87
+      buildConfiguration = "Debug">
88
+   </AnalyzeAction>
89
+   <ArchiveAction
90
+      buildConfiguration = "Release"
91
+      revealArchiveInOrganizer = "YES">
92
+   </ArchiveAction>
93
+</Scheme>

+ 7
- 0
example/ios/Runner.xcworkspace/contents.xcworkspacedata 查看文件

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:Runner.xcodeproj">
6
+   </FileRef>
7
+</Workspace>

+ 13
- 0
example/ios/Runner/AppDelegate.swift 查看文件

@@ -0,0 +1,13 @@
1
+import UIKit
2
+import Flutter
3
+
4
+@UIApplicationMain
5
+@objc class AppDelegate: FlutterAppDelegate {
6
+  override func application(
7
+    _ application: UIApplication,
8
+    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
9
+  ) -> Bool {
10
+    GeneratedPluginRegistrant.register(with: self)
11
+    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12
+  }
13
+}

+ 122
- 0
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json 查看文件

@@ -0,0 +1,122 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "size" : "20x20",
5
+      "idiom" : "iphone",
6
+      "filename" : "Icon-App-20x20@2x.png",
7
+      "scale" : "2x"
8
+    },
9
+    {
10
+      "size" : "20x20",
11
+      "idiom" : "iphone",
12
+      "filename" : "Icon-App-20x20@3x.png",
13
+      "scale" : "3x"
14
+    },
15
+    {
16
+      "size" : "29x29",
17
+      "idiom" : "iphone",
18
+      "filename" : "Icon-App-29x29@1x.png",
19
+      "scale" : "1x"
20
+    },
21
+    {
22
+      "size" : "29x29",
23
+      "idiom" : "iphone",
24
+      "filename" : "Icon-App-29x29@2x.png",
25
+      "scale" : "2x"
26
+    },
27
+    {
28
+      "size" : "29x29",
29
+      "idiom" : "iphone",
30
+      "filename" : "Icon-App-29x29@3x.png",
31
+      "scale" : "3x"
32
+    },
33
+    {
34
+      "size" : "40x40",
35
+      "idiom" : "iphone",
36
+      "filename" : "Icon-App-40x40@2x.png",
37
+      "scale" : "2x"
38
+    },
39
+    {
40
+      "size" : "40x40",
41
+      "idiom" : "iphone",
42
+      "filename" : "Icon-App-40x40@3x.png",
43
+      "scale" : "3x"
44
+    },
45
+    {
46
+      "size" : "60x60",
47
+      "idiom" : "iphone",
48
+      "filename" : "Icon-App-60x60@2x.png",
49
+      "scale" : "2x"
50
+    },
51
+    {
52
+      "size" : "60x60",
53
+      "idiom" : "iphone",
54
+      "filename" : "Icon-App-60x60@3x.png",
55
+      "scale" : "3x"
56
+    },
57
+    {
58
+      "size" : "20x20",
59
+      "idiom" : "ipad",
60
+      "filename" : "Icon-App-20x20@1x.png",
61
+      "scale" : "1x"
62
+    },
63
+    {
64
+      "size" : "20x20",
65
+      "idiom" : "ipad",
66
+      "filename" : "Icon-App-20x20@2x.png",
67
+      "scale" : "2x"
68
+    },
69
+    {
70
+      "size" : "29x29",
71
+      "idiom" : "ipad",
72
+      "filename" : "Icon-App-29x29@1x.png",
73
+      "scale" : "1x"
74
+    },
75
+    {
76
+      "size" : "29x29",
77
+      "idiom" : "ipad",
78
+      "filename" : "Icon-App-29x29@2x.png",
79
+      "scale" : "2x"
80
+    },
81
+    {
82
+      "size" : "40x40",
83
+      "idiom" : "ipad",
84
+      "filename" : "Icon-App-40x40@1x.png",
85
+      "scale" : "1x"
86
+    },
87
+    {
88
+      "size" : "40x40",
89
+      "idiom" : "ipad",
90
+      "filename" : "Icon-App-40x40@2x.png",
91
+      "scale" : "2x"
92
+    },
93
+    {
94
+      "size" : "76x76",
95
+      "idiom" : "ipad",
96
+      "filename" : "Icon-App-76x76@1x.png",
97
+      "scale" : "1x"
98
+    },
99
+    {
100
+      "size" : "76x76",
101
+      "idiom" : "ipad",
102
+      "filename" : "Icon-App-76x76@2x.png",
103
+      "scale" : "2x"
104
+    },
105
+    {
106
+      "size" : "83.5x83.5",
107
+      "idiom" : "ipad",
108
+      "filename" : "Icon-App-83.5x83.5@2x.png",
109
+      "scale" : "2x"
110
+    },
111
+    {
112
+      "size" : "1024x1024",
113
+      "idiom" : "ios-marketing",
114
+      "filename" : "Icon-App-1024x1024@1x.png",
115
+      "scale" : "1x"
116
+    }
117
+  ],
118
+  "info" : {
119
+    "version" : 1,
120
+    "author" : "xcode"
121
+  }
122
+}

二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png 查看文件


+ 23
- 0
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json 查看文件

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "LaunchImage.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "LaunchImage@2x.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "LaunchImage@3x.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

二進制
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png 查看文件


二進制
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png 查看文件


+ 5
- 0
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md 查看文件

@@ -0,0 +1,5 @@
1
+# Launch Screen Assets
2
+
3
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4
+
5
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

+ 37
- 0
example/ios/Runner/Base.lproj/LaunchScreen.storyboard 查看文件

@@ -0,0 +1,37 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
+    <dependencies>
4
+        <deployment identifier="iOS"/>
5
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
6
+    </dependencies>
7
+    <scenes>
8
+        <!--View Controller-->
9
+        <scene sceneID="EHf-IW-A2E">
10
+            <objects>
11
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
12
+                    <layoutGuides>
13
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
14
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
15
+                    </layoutGuides>
16
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
17
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18
+                        <subviews>
19
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
20
+                            </imageView>
21
+                        </subviews>
22
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
23
+                        <constraints>
24
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
25
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
26
+                        </constraints>
27
+                    </view>
28
+                </viewController>
29
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
30
+            </objects>
31
+            <point key="canvasLocation" x="53" y="375"/>
32
+        </scene>
33
+    </scenes>
34
+    <resources>
35
+        <image name="LaunchImage" width="168" height="185"/>
36
+    </resources>
37
+</document>

+ 26
- 0
example/ios/Runner/Base.lproj/Main.storyboard 查看文件

@@ -0,0 +1,26 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
3
+    <dependencies>
4
+        <deployment identifier="iOS"/>
5
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
6
+    </dependencies>
7
+    <scenes>
8
+        <!--Flutter View Controller-->
9
+        <scene sceneID="tne-QT-ifu">
10
+            <objects>
11
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
12
+                    <layoutGuides>
13
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
14
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
15
+                    </layoutGuides>
16
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
17
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
20
+                    </view>
21
+                </viewController>
22
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
23
+            </objects>
24
+        </scene>
25
+    </scenes>
26
+</document>

+ 45
- 0
example/ios/Runner/Info.plist 查看文件

@@ -0,0 +1,45 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>mofun_flutter_plugin_video_example</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>APPL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>$(FLUTTER_BUILD_NAME)</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
23
+	<key>LSRequiresIPhoneOS</key>
24
+	<true/>
25
+	<key>UILaunchStoryboardName</key>
26
+	<string>LaunchScreen</string>
27
+	<key>UIMainStoryboardFile</key>
28
+	<string>Main</string>
29
+	<key>UISupportedInterfaceOrientations</key>
30
+	<array>
31
+		<string>UIInterfaceOrientationPortrait</string>
32
+		<string>UIInterfaceOrientationLandscapeLeft</string>
33
+		<string>UIInterfaceOrientationLandscapeRight</string>
34
+	</array>
35
+	<key>UISupportedInterfaceOrientations~ipad</key>
36
+	<array>
37
+		<string>UIInterfaceOrientationPortrait</string>
38
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
39
+		<string>UIInterfaceOrientationLandscapeLeft</string>
40
+		<string>UIInterfaceOrientationLandscapeRight</string>
41
+	</array>
42
+	<key>UIViewControllerBasedStatusBarAppearance</key>
43
+	<false/>
44
+</dict>
45
+</plist>

+ 1
- 0
example/ios/Runner/Runner-Bridging-Header.h 查看文件

@@ -0,0 +1 @@
1
+#import "GeneratedPluginRegistrant.h"

+ 56
- 0
example/lib/main.dart 查看文件

@@ -0,0 +1,56 @@
1
+import 'package:flutter/material.dart';
2
+import 'dart:async';
3
+
4
+import 'package:flutter/services.dart';
5
+import 'package:mofun_flutter_plugin_video/mofun_flutter_plugin_video.dart';
6
+
7
+void main() => runApp(MyApp());
8
+
9
+class MyApp extends StatefulWidget {
10
+  @override
11
+  _MyAppState createState() => _MyAppState();
12
+}
13
+
14
+class _MyAppState extends State<MyApp> {
15
+  String _platformVersion = 'Unknown';
16
+
17
+  @override
18
+  void initState() {
19
+    super.initState();
20
+    initPlatformState();
21
+  }
22
+
23
+  // Platform messages are asynchronous, so we initialize in an async method.
24
+  Future<void> initPlatformState() async {
25
+    String platformVersion;
26
+    // Platform messages may fail, so we use a try/catch PlatformException.
27
+    try {
28
+      platformVersion = await MofunFlutterPluginVideo.platformVersion;
29
+    } on PlatformException {
30
+      platformVersion = 'Failed to get platform version.';
31
+    }
32
+
33
+    // If the widget was removed from the tree while the asynchronous platform
34
+    // message was in flight, we want to discard the reply rather than calling
35
+    // setState to update our non-existent appearance.
36
+    if (!mounted) return;
37
+
38
+    setState(() {
39
+      _platformVersion = platformVersion;
40
+    });
41
+  }
42
+
43
+  @override
44
+  Widget build(BuildContext context) {
45
+    return MaterialApp(
46
+      home: Scaffold(
47
+        appBar: AppBar(
48
+          title: const Text('Plugin example app'),
49
+        ),
50
+        body: Center(
51
+          child: Text('Running on: $_platformVersion\n'),
52
+        ),
53
+      ),
54
+    );
55
+  }
56
+}

+ 153
- 0
example/pubspec.lock 查看文件

@@ -0,0 +1,153 @@
1
+# Generated by pub
2
+# See https://www.dartlang.org/tools/pub/glossary#lockfile
3
+packages:
4
+  async:
5
+    dependency: transitive
6
+    description:
7
+      name: async
8
+      url: "https://pub.flutter-io.cn"
9
+    source: hosted
10
+    version: "2.1.0"
11
+  boolean_selector:
12
+    dependency: transitive
13
+    description:
14
+      name: boolean_selector
15
+      url: "https://pub.flutter-io.cn"
16
+    source: hosted
17
+    version: "1.0.4"
18
+  charcode:
19
+    dependency: transitive
20
+    description:
21
+      name: charcode
22
+      url: "https://pub.flutter-io.cn"
23
+    source: hosted
24
+    version: "1.1.2"
25
+  collection:
26
+    dependency: transitive
27
+    description:
28
+      name: collection
29
+      url: "https://pub.flutter-io.cn"
30
+    source: hosted
31
+    version: "1.14.11"
32
+  cupertino_icons:
33
+    dependency: "direct main"
34
+    description:
35
+      name: cupertino_icons
36
+      url: "https://pub.flutter-io.cn"
37
+    source: hosted
38
+    version: "0.1.2"
39
+  flutter:
40
+    dependency: "direct main"
41
+    description: flutter
42
+    source: sdk
43
+    version: "0.0.0"
44
+  flutter_test:
45
+    dependency: "direct dev"
46
+    description: flutter
47
+    source: sdk
48
+    version: "0.0.0"
49
+  matcher:
50
+    dependency: transitive
51
+    description:
52
+      name: matcher
53
+      url: "https://pub.flutter-io.cn"
54
+    source: hosted
55
+    version: "0.12.5"
56
+  meta:
57
+    dependency: transitive
58
+    description:
59
+      name: meta
60
+      url: "https://pub.flutter-io.cn"
61
+    source: hosted
62
+    version: "1.1.6"
63
+  mofun_flutter_plugin_video:
64
+    dependency: "direct dev"
65
+    description:
66
+      path: ".."
67
+      relative: true
68
+    source: path
69
+    version: "0.0.1"
70
+  path:
71
+    dependency: transitive
72
+    description:
73
+      name: path
74
+      url: "https://pub.flutter-io.cn"
75
+    source: hosted
76
+    version: "1.6.2"
77
+  pedantic:
78
+    dependency: transitive
79
+    description:
80
+      name: pedantic
81
+      url: "https://pub.flutter-io.cn"
82
+    source: hosted
83
+    version: "1.5.0"
84
+  quiver:
85
+    dependency: transitive
86
+    description:
87
+      name: quiver
88
+      url: "https://pub.flutter-io.cn"
89
+    source: hosted
90
+    version: "2.0.2"
91
+  sky_engine:
92
+    dependency: transitive
93
+    description: flutter
94
+    source: sdk
95
+    version: "0.0.99"
96
+  source_span:
97
+    dependency: transitive
98
+    description:
99
+      name: source_span
100
+      url: "https://pub.flutter-io.cn"
101
+    source: hosted
102
+    version: "1.5.5"
103
+  stack_trace:
104
+    dependency: transitive
105
+    description:
106
+      name: stack_trace
107
+      url: "https://pub.flutter-io.cn"
108
+    source: hosted
109
+    version: "1.9.3"
110
+  stream_channel:
111
+    dependency: transitive
112
+    description:
113
+      name: stream_channel
114
+      url: "https://pub.flutter-io.cn"
115
+    source: hosted
116
+    version: "2.0.0"
117
+  string_scanner:
118
+    dependency: transitive
119
+    description:
120
+      name: string_scanner
121
+      url: "https://pub.flutter-io.cn"
122
+    source: hosted
123
+    version: "1.0.4"
124
+  term_glyph:
125
+    dependency: transitive
126
+    description:
127
+      name: term_glyph
128
+      url: "https://pub.flutter-io.cn"
129
+    source: hosted
130
+    version: "1.1.0"
131
+  test_api:
132
+    dependency: transitive
133
+    description:
134
+      name: test_api
135
+      url: "https://pub.flutter-io.cn"
136
+    source: hosted
137
+    version: "0.2.4"
138
+  typed_data:
139
+    dependency: transitive
140
+    description:
141
+      name: typed_data
142
+      url: "https://pub.flutter-io.cn"
143
+    source: hosted
144
+    version: "1.1.6"
145
+  vector_math:
146
+    dependency: transitive
147
+    description:
148
+      name: vector_math
149
+      url: "https://pub.flutter-io.cn"
150
+    source: hosted
151
+    version: "2.0.8"
152
+sdks:
153
+  dart: ">=2.2.0 <3.0.0"

+ 63
- 0
example/pubspec.yaml 查看文件

@@ -0,0 +1,63 @@
1
+name: mofun_flutter_plugin_video_example
2
+description: Demonstrates how to use the mofun_flutter_plugin_video plugin.
3
+publish_to: 'none'
4
+
5
+environment:
6
+  sdk: ">=2.1.0 <3.0.0"
7
+
8
+dependencies:
9
+  flutter:
10
+    sdk: flutter
11
+
12
+  # The following adds the Cupertino Icons font to your application.
13
+  # Use with the CupertinoIcons class for iOS style icons.
14
+  cupertino_icons: ^0.1.2
15
+
16
+dev_dependencies:
17
+  flutter_test:
18
+    sdk: flutter
19
+
20
+  mofun_flutter_plugin_video:
21
+    path: ../
22
+
23
+# For information on the generic Dart part of this file, see the
24
+# following page: https://www.dartlang.org/tools/pub/pubspec
25
+
26
+# The following section is specific to Flutter.
27
+flutter:
28
+
29
+  # The following line ensures that the Material Icons font is
30
+  # included with your application, so that you can use the icons in
31
+  # the material Icons class.
32
+  uses-material-design: true
33
+
34
+  # To add assets to your application, add an assets section, like this:
35
+  # assets:
36
+  #  - images/a_dot_burr.jpeg
37
+  #  - images/a_dot_ham.jpeg
38
+
39
+  # An image asset can refer to one or more resolution-specific "variants", see
40
+  # https://flutter.dev/assets-and-images/#resolution-aware.
41
+
42
+  # For details regarding adding assets from package dependencies, see
43
+  # https://flutter.dev/assets-and-images/#from-packages
44
+
45
+  # To add custom fonts to your application, add a fonts section here,
46
+  # in this "flutter" section. Each entry in this list should have a
47
+  # "family" key with the font family name, and a "fonts" key with a
48
+  # list giving the asset and other descriptors for the font. For
49
+  # example:
50
+  # fonts:
51
+  #   - family: Schyler
52
+  #     fonts:
53
+  #       - asset: fonts/Schyler-Regular.ttf
54
+  #       - asset: fonts/Schyler-Italic.ttf
55
+  #         style: italic
56
+  #   - family: Trajan Pro
57
+  #     fonts:
58
+  #       - asset: fonts/TrajanPro.ttf
59
+  #       - asset: fonts/TrajanPro_Bold.ttf
60
+  #         weight: 700
61
+  #
62
+  # For details regarding fonts from package dependencies,
63
+  # see https://flutter.dev/custom-fonts/#from-packages

+ 27
- 0
example/test/widget_test.dart 查看文件

@@ -0,0 +1,27 @@
1
+// This is a basic Flutter widget test.
2
+//
3
+// To perform an interaction with a widget in your test, use the WidgetTester
4
+// utility that Flutter provides. For example, you can send tap and scroll
5
+// gestures. You can also use WidgetTester to find child widgets in the widget
6
+// tree, read text, and verify that the values of widget properties are correct.
7
+
8
+import 'package:flutter/material.dart';
9
+import 'package:flutter_test/flutter_test.dart';
10
+
11
+import 'package:mofun_flutter_plugin_video_example/main.dart';
12
+
13
+void main() {
14
+  testWidgets('Verify Platform version', (WidgetTester tester) async {
15
+    // Build our app and trigger a frame.
16
+    await tester.pumpWidget(MyApp());
17
+
18
+    // Verify that platform version is retrieved.
19
+    expect(
20
+      find.byWidgetPredicate(
21
+        (Widget widget) => widget is Text &&
22
+                           widget.data.startsWith('Running on:'),
23
+      ),
24
+      findsOneWidget,
25
+    );
26
+  });
27
+}

+ 36
- 0
ios/.gitignore 查看文件

@@ -0,0 +1,36 @@
1
+.idea/
2
+.vagrant/
3
+.sconsign.dblite
4
+.svn/
5
+
6
+.DS_Store
7
+*.swp
8
+profile
9
+
10
+DerivedData/
11
+build/
12
+GeneratedPluginRegistrant.h
13
+GeneratedPluginRegistrant.m
14
+
15
+.generated/
16
+
17
+*.pbxuser
18
+*.mode1v3
19
+*.mode2v3
20
+*.perspectivev3
21
+
22
+!default.pbxuser
23
+!default.mode1v3
24
+!default.mode2v3
25
+!default.perspectivev3
26
+
27
+xcuserdata
28
+
29
+*.moved-aside
30
+
31
+*.pyc
32
+*sync/
33
+Icon?
34
+.tags*
35
+
36
+/Flutter/Generated.xcconfig

+ 0
- 0
ios/Assets/.gitkeep 查看文件


+ 4
- 0
ios/Classes/MofunFlutterPluginVideoPlugin.h 查看文件

@@ -0,0 +1,4 @@
1
+#import <Flutter/Flutter.h>
2
+
3
+@interface MofunFlutterPluginVideoPlugin : NSObject<FlutterPlugin>
4
+@end

+ 8
- 0
ios/Classes/MofunFlutterPluginVideoPlugin.m 查看文件

@@ -0,0 +1,8 @@
1
+#import "MofunFlutterPluginVideoPlugin.h"
2
+#import <mofun_flutter_plugin_video/mofun_flutter_plugin_video-Swift.h>
3
+
4
+@implementation MofunFlutterPluginVideoPlugin
5
++ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
6
+  [SwiftMofunFlutterPluginVideoPlugin registerWithRegistrar:registrar];
7
+}
8
+@end

+ 14
- 0
ios/Classes/SwiftMofunFlutterPluginVideoPlugin.swift 查看文件

@@ -0,0 +1,14 @@
1
+import Flutter
2
+import UIKit
3
+
4
+public class SwiftMofunFlutterPluginVideoPlugin: NSObject, FlutterPlugin {
5
+  public static func register(with registrar: FlutterPluginRegistrar) {
6
+    let channel = FlutterMethodChannel(name: "mofun_flutter_plugin_video", binaryMessenger: registrar.messenger())
7
+    let instance = SwiftMofunFlutterPluginVideoPlugin()
8
+    registrar.addMethodCallDelegate(instance, channel: channel)
9
+  }
10
+
11
+  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
12
+    result("iOS " + UIDevice.current.systemVersion)
13
+  }
14
+}

+ 21
- 0
ios/mofun_flutter_plugin_video.podspec 查看文件

@@ -0,0 +1,21 @@
1
+#
2
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3
+#
4
+Pod::Spec.new do |s|
5
+  s.name             = 'mofun_flutter_plugin_video'
6
+  s.version          = '0.0.1'
7
+  s.summary          = 'Flutter plugin for mofun video play and edit.'
8
+  s.description      = <<-DESC
9
+Flutter plugin for mofun video play and edit.
10
+                       DESC
11
+  s.homepage         = 'http://example.com'
12
+  s.license          = { :file => '../LICENSE' }
13
+  s.author           = { 'Your Company' => 'email@example.com' }
14
+  s.source           = { :path => '.' }
15
+  s.source_files = 'Classes/**/*'
16
+  s.public_header_files = 'Classes/**/*.h'
17
+  s.dependency 'Flutter'
18
+
19
+  s.ios.deployment_target = '8.0'
20
+end
21
+

+ 13
- 0
lib/mofun_flutter_plugin_video.dart 查看文件

@@ -0,0 +1,13 @@
1
+import 'dart:async';
2
+
3
+import 'package:flutter/services.dart';
4
+
5
+class MofunFlutterPluginVideo {
6
+  static const MethodChannel _channel =
7
+      const MethodChannel('mofun_flutter_plugin_video');
8
+
9
+  static Future<String> get platformVersion async {
10
+    final String version = await _channel.invokeMethod('getPlatformVersion');
11
+    return version;
12
+  }
13
+}

+ 60
- 0
lib/mofun_video_view.dart 查看文件

@@ -0,0 +1,60 @@
1
+import 'dart:async';
2
+
3
+import 'package:flutter/foundation.dart';
4
+import 'package:flutter/services.dart';
5
+import 'package:flutter/widgets.dart';
6
+
7
+typedef void MofunVideoViewCreatedCallback(MofunVideoViewController controller);
8
+
9
+class MofunVideoView extends StatefulWidget {
10
+  final MofunVideoViewCreatedCallback onMofunVideoViewCreated;
11
+
12
+  const MofunVideoView({
13
+    Key key,
14
+    this.onMofunVideoViewCreated,
15
+  }) : super(key: key);
16
+
17
+  @override
18
+  State<StatefulWidget> createState() {
19
+    return _MofunVideoViewState();
20
+  }
21
+
22
+}
23
+
24
+class _MofunVideoViewState extends State<MofunVideoView> {
25
+  @override
26
+  Widget build(BuildContext context) {
27
+    if (defaultTargetPlatform == TargetPlatform.android) {
28
+      return AndroidView(
29
+        viewType: 'plugins.shuangyunbang.mofun/mofunvideoview',
30
+        onPlatformViewCreated: _onPlatformViewCreated,
31
+      );
32
+    }else if (defaultTargetPlatform == TargetPlatform.iOS) {
33
+      return UiKitView(
34
+        viewType: 'plugins.shuangyunbang.mofun/mofunvideoview',
35
+        onPlatformViewCreated: _onPlatformViewCreated,
36
+      );
37
+    }
38
+    return Text(
39
+        '$defaultTargetPlatform is not yet supported by the text_view plugin');
40
+  }
41
+
42
+  void _onPlatformViewCreated(int id) {
43
+    if (widget.onMofunVideoViewCreated == null) {
44
+      return;
45
+    }
46
+    widget.onMofunVideoViewCreated(new MofunVideoViewController._(id));
47
+  }
48
+}
49
+
50
+class MofunVideoViewController {
51
+  MofunVideoViewController._(int id)
52
+      : _channel = new MethodChannel('plugins.shuangyunbang.mofun/mofunvideoview_$id');
53
+
54
+  final MethodChannel _channel;
55
+
56
+  Future<void> setText(String text) async {
57
+    assert(text != null);
58
+    return _channel.invokeMethod('setText', text);
59
+  }
60
+}

+ 139
- 0
pubspec.lock 查看文件

@@ -0,0 +1,139 @@
1
+# Generated by pub
2
+# See https://www.dartlang.org/tools/pub/glossary#lockfile
3
+packages:
4
+  async:
5
+    dependency: transitive
6
+    description:
7
+      name: async
8
+      url: "https://pub.flutter-io.cn"
9
+    source: hosted
10
+    version: "2.1.0"
11
+  boolean_selector:
12
+    dependency: transitive
13
+    description:
14
+      name: boolean_selector
15
+      url: "https://pub.flutter-io.cn"
16
+    source: hosted
17
+    version: "1.0.4"
18
+  charcode:
19
+    dependency: transitive
20
+    description:
21
+      name: charcode
22
+      url: "https://pub.flutter-io.cn"
23
+    source: hosted
24
+    version: "1.1.2"
25
+  collection:
26
+    dependency: transitive
27
+    description:
28
+      name: collection
29
+      url: "https://pub.flutter-io.cn"
30
+    source: hosted
31
+    version: "1.14.11"
32
+  flutter:
33
+    dependency: "direct main"
34
+    description: flutter
35
+    source: sdk
36
+    version: "0.0.0"
37
+  flutter_test:
38
+    dependency: "direct dev"
39
+    description: flutter
40
+    source: sdk
41
+    version: "0.0.0"
42
+  matcher:
43
+    dependency: transitive
44
+    description:
45
+      name: matcher
46
+      url: "https://pub.flutter-io.cn"
47
+    source: hosted
48
+    version: "0.12.5"
49
+  meta:
50
+    dependency: transitive
51
+    description:
52
+      name: meta
53
+      url: "https://pub.flutter-io.cn"
54
+    source: hosted
55
+    version: "1.1.6"
56
+  path:
57
+    dependency: transitive
58
+    description:
59
+      name: path
60
+      url: "https://pub.flutter-io.cn"
61
+    source: hosted
62
+    version: "1.6.2"
63
+  pedantic:
64
+    dependency: transitive
65
+    description:
66
+      name: pedantic
67
+      url: "https://pub.flutter-io.cn"
68
+    source: hosted
69
+    version: "1.5.0"
70
+  quiver:
71
+    dependency: transitive
72
+    description:
73
+      name: quiver
74
+      url: "https://pub.flutter-io.cn"
75
+    source: hosted
76
+    version: "2.0.2"
77
+  sky_engine:
78
+    dependency: transitive
79
+    description: flutter
80
+    source: sdk
81
+    version: "0.0.99"
82
+  source_span:
83
+    dependency: transitive
84
+    description:
85
+      name: source_span
86
+      url: "https://pub.flutter-io.cn"
87
+    source: hosted
88
+    version: "1.5.5"
89
+  stack_trace:
90
+    dependency: transitive
91
+    description:
92
+      name: stack_trace
93
+      url: "https://pub.flutter-io.cn"
94
+    source: hosted
95
+    version: "1.9.3"
96
+  stream_channel:
97
+    dependency: transitive
98
+    description:
99
+      name: stream_channel
100
+      url: "https://pub.flutter-io.cn"
101
+    source: hosted
102
+    version: "2.0.0"
103
+  string_scanner:
104
+    dependency: transitive
105
+    description:
106
+      name: string_scanner
107
+      url: "https://pub.flutter-io.cn"
108
+    source: hosted
109
+    version: "1.0.4"
110
+  term_glyph:
111
+    dependency: transitive
112
+    description:
113
+      name: term_glyph
114
+      url: "https://pub.flutter-io.cn"
115
+    source: hosted
116
+    version: "1.1.0"
117
+  test_api:
118
+    dependency: transitive
119
+    description:
120
+      name: test_api
121
+      url: "https://pub.flutter-io.cn"
122
+    source: hosted
123
+    version: "0.2.4"
124
+  typed_data:
125
+    dependency: transitive
126
+    description:
127
+      name: typed_data
128
+      url: "https://pub.flutter-io.cn"
129
+    source: hosted
130
+    version: "1.1.6"
131
+  vector_math:
132
+    dependency: transitive
133
+    description:
134
+      name: vector_math
135
+      url: "https://pub.flutter-io.cn"
136
+    source: hosted
137
+    version: "2.0.8"
138
+sdks:
139
+  dart: ">=2.2.0 <3.0.0"

+ 60
- 0
pubspec.yaml 查看文件

@@ -0,0 +1,60 @@
1
+name: mofun_flutter_plugin_video
2
+description: Flutter plugin for mofun video play and edit.
3
+version: 0.0.1
4
+author:
5
+homepage:
6
+
7
+environment:
8
+  sdk: ">=2.1.0 <3.0.0"
9
+
10
+dependencies:
11
+  flutter:
12
+    sdk: flutter
13
+
14
+dev_dependencies:
15
+  flutter_test:
16
+    sdk: flutter
17
+
18
+# For information on the generic Dart part of this file, see the
19
+# following page: https://www.dartlang.org/tools/pub/pubspec
20
+
21
+# The following section is specific to Flutter.
22
+flutter:
23
+  # This section identifies this Flutter project as a plugin project.
24
+  # The androidPackage and pluginClass identifiers should not ordinarily
25
+  # be modified. They are used by the tooling to maintain consistency when
26
+  # adding or updating assets for this project.
27
+  plugin:
28
+    androidPackage: com.shuangyubang.mofun_flutter_plugin_video
29
+    pluginClass: MofunFlutterPluginVideoPlugin
30
+
31
+  # To add assets to your plugin package, add an assets section, like this:
32
+  # assets:
33
+  #  - images/a_dot_burr.jpeg
34
+  #  - images/a_dot_ham.jpeg
35
+  #
36
+  # For details regarding assets in packages, see
37
+  # https://flutter.dev/assets-and-images/#from-packages
38
+  #
39
+  # An image asset can refer to one or more resolution-specific "variants", see
40
+  # https://flutter.dev/assets-and-images/#resolution-aware.
41
+
42
+  # To add custom fonts to your plugin package, add a fonts section here,
43
+  # in this "flutter" section. Each entry in this list should have a
44
+  # "family" key with the font family name, and a "fonts" key with a
45
+  # list giving the asset and other descriptors for the font. For
46
+  # example:
47
+  # fonts:
48
+  #   - family: Schyler
49
+  #     fonts:
50
+  #       - asset: fonts/Schyler-Regular.ttf
51
+  #       - asset: fonts/Schyler-Italic.ttf
52
+  #         style: italic
53
+  #   - family: Trajan Pro
54
+  #     fonts:
55
+  #       - asset: fonts/TrajanPro.ttf
56
+  #       - asset: fonts/TrajanPro_Bold.ttf
57
+  #         weight: 700
58
+  #
59
+  # For details regarding fonts in packages, see
60
+  # https://flutter.dev/custom-fonts/#from-packages

+ 21
- 0
test/mofun_flutter_plugin_video_test.dart 查看文件

@@ -0,0 +1,21 @@
1
+import 'package:flutter/services.dart';
2
+import 'package:flutter_test/flutter_test.dart';
3
+import 'package:mofun_flutter_plugin_video/mofun_flutter_plugin_video.dart';
4
+
5
+void main() {
6
+  const MethodChannel channel = MethodChannel('mofun_flutter_plugin_video');
7
+
8
+  setUp(() {
9
+    channel.setMockMethodCallHandler((MethodCall methodCall) async {
10
+      return '42';
11
+    });
12
+  });
13
+
14
+  tearDown(() {
15
+    channel.setMockMethodCallHandler(null);
16
+  });
17
+
18
+  test('getPlatformVersion', () async {
19
+    expect(await MofunFlutterPluginVideo.platformVersion, '42');
20
+  });
21
+}