├── .gitignore
├── .metadata
├── README.md
├── android
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_app
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── drawable-xhdpi
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-xxhdpi
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-xxxhdpi
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── logo.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
└── images
│ ├── icon_cling_history.png
│ ├── icon_main_add_url.png
│ ├── icon_to_cling.png
│ ├── logo.png
│ ├── main_header.png
│ ├── pause.png
│ ├── playing.png
│ ├── shangyiqu.png
│ ├── xiayiqu.png
│ ├── yinliangda.png
│ └── yinliangxiao.png
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── main.m
├── lib
├── home
│ ├── customviews
│ │ ├── GradientButton.dart
│ │ ├── TurnBox.dart
│ │ └── file
│ │ │ └── FileOperationRoute.dart
│ ├── home.dart
│ ├── model
│ │ └── SourceBean.dart
│ ├── remotelocal
│ │ ├── child
│ │ │ ├── childdetail
│ │ │ │ ├── localAudio.dart
│ │ │ │ ├── localImage.dart
│ │ │ │ └── localVideo.dart
│ │ │ ├── localsource.dart
│ │ │ └── remotesource2.dart
│ │ ├── playDetail.dart
│ │ └── remotesource.dart
│ ├── routeani
│ │ └── SlideRightRoute.dart
│ └── setting
│ │ └── setting.dart
└── main.dart
├── plugins
├── flutter_dlan
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── android
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── settings.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── tech
│ │ │ └── shmy
│ │ │ └── plugin
│ │ │ └── dlan
│ │ │ └── flutter_dlan
│ │ │ ├── BrowseRegistryListener.java
│ │ │ └── FlutterDlanPlugin.java
│ ├── example
│ │ ├── .gitignore
│ │ ├── .metadata
│ │ ├── README.md
│ │ ├── android
│ │ │ ├── app
│ │ │ │ ├── build.gradle
│ │ │ │ └── src
│ │ │ │ │ ├── debug
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ ├── main
│ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ ├── java
│ │ │ │ │ │ └── tech
│ │ │ │ │ │ │ └── shmy
│ │ │ │ │ │ │ └── plugin
│ │ │ │ │ │ │ └── dlan
│ │ │ │ │ │ │ └── flutter_dlan_example
│ │ │ │ │ │ │ └── MainActivity.java
│ │ │ │ │ └── res
│ │ │ │ │ │ ├── drawable
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ └── values
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── profile
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ ├── build.gradle
│ │ │ ├── gradle.properties
│ │ │ ├── gradle
│ │ │ │ └── wrapper
│ │ │ │ │ └── gradle-wrapper.properties
│ │ │ └── settings.gradle
│ │ ├── ios
│ │ │ ├── Flutter
│ │ │ │ ├── AppFrameworkInfo.plist
│ │ │ │ ├── Debug.xcconfig
│ │ │ │ └── Release.xcconfig
│ │ │ ├── Podfile
│ │ │ ├── Runner.xcodeproj
│ │ │ │ ├── project.pbxproj
│ │ │ │ ├── project.xcworkspace
│ │ │ │ │ └── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── xcschemes
│ │ │ │ │ └── Runner.xcscheme
│ │ │ ├── Runner.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── Runner
│ │ │ │ ├── AppDelegate.h
│ │ │ │ ├── AppDelegate.m
│ │ │ │ ├── Assets.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ │ └── LaunchImage.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ ├── LaunchImage.png
│ │ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ │ └── README.md
│ │ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ │ │ ├── Info.plist
│ │ │ │ └── main.m
│ │ ├── lib
│ │ │ └── main.dart
│ │ ├── pubspec.lock
│ │ ├── pubspec.yaml
│ │ └── test
│ │ │ └── widget_test.dart
│ ├── ios
│ │ ├── .gitignore
│ │ ├── Assets
│ │ │ └── .gitkeep
│ │ ├── Classes
│ │ │ ├── FlutterDlanPlugin.h
│ │ │ └── FlutterDlanPlugin.m
│ │ └── flutter_dlan.podspec
│ ├── lib
│ │ └── flutter_dlan.dart
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ ├── test
│ │ └── flutter_dlan_test.dart
│ └── todo.md
└── flutter_plugin
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── android
│ ├── .gitignore
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ ├── example
│ │ └── flutter_plugin
│ │ │ ├── BrowseRegistryListener.java
│ │ │ ├── FlutterPlugin.java
│ │ │ └── MediePalyUtil.java
│ │ └── tool
│ │ └── clinglibrary2
│ │ ├── VConstants.java
│ │ ├── VError.java
│ │ ├── VIntents.java
│ │ ├── callback
│ │ ├── AVTransportCallback.java
│ │ ├── BaseSubscriptionCallback.java
│ │ ├── ContentBrowseCallback.java
│ │ ├── ControlCallback.java
│ │ └── RenderingControlCallback.java
│ │ ├── database
│ │ └── MediaContentDao.java
│ │ ├── entity
│ │ ├── AVTransportInfo.java
│ │ ├── ClingDevice.java
│ │ ├── RemoteItem.java
│ │ ├── RenderingControlInfo.java
│ │ └── VItem.java
│ │ ├── event
│ │ ├── ControlEvent.java
│ │ ├── CurrentDeviceEvent.java
│ │ ├── DIDLEvent.java
│ │ └── DeviceEvent.java
│ │ ├── listener
│ │ └── ClingRegistryListener.java
│ │ ├── manager
│ │ ├── ClingManager.java
│ │ ├── ControlManager.java
│ │ └── DeviceManager.java
│ │ ├── service
│ │ ├── ClingService.java
│ │ ├── SystemService.java
│ │ └── upnp
│ │ │ ├── AndroidJettyServletContainer.java
│ │ │ ├── AudioResourceServlet.java
│ │ │ ├── ClingContentDirectoryService.java
│ │ │ ├── ImageResourceServlet.java
│ │ │ ├── JettyResourceServer.java
│ │ │ └── VideoResourceServlet.java
│ │ └── utils
│ │ └── ClingUtil.java
│ ├── example
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── android
│ │ ├── app
│ │ │ ├── build.gradle
│ │ │ └── src
│ │ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── flutter_plugin_example
│ │ │ │ │ │ └── MainActivity.java
│ │ │ │ └── res
│ │ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ └── gradle-wrapper.properties
│ │ └── settings.gradle
│ ├── ios
│ │ ├── Flutter
│ │ │ ├── AppFrameworkInfo.plist
│ │ │ ├── Debug.xcconfig
│ │ │ └── Release.xcconfig
│ │ ├── Runner.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ ├── Runner.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── Runner
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ ├── lib
│ │ └── main.dart
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ └── test
│ │ └── widget_test.dart
│ ├── ios
│ ├── .gitignore
│ ├── Assets
│ │ └── .gitkeep
│ ├── Classes
│ │ ├── FlutterPlugin.h
│ │ └── FlutterPlugin.m
│ └── flutter_plugin.podspec
│ ├── lib
│ └── flutter_plugin.dart
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ └── test
│ └── flutter_plugin_test.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
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 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
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: 20e59316b8b8474554b38493b8ca888794b0234a
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter-cling
2 | flutter 投屏(Android)
3 |
4 | ### 投屏项目,已实现功能
5 | 1. 获取投屏设备列表。
6 | 2. 获取本地图片、视频、音频文件列表
7 | 3. 投屏本地资源。
8 |
9 | ### 尚未完成
10 | 1. 播放远程视频
11 | 2. 加载网页
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.example.clingric"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 |
52 | packagingOptions {
53 | exclude 'META-INF/beans.xml'
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | testImplementation 'junit:junit:4.12'
63 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
64 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
65 | }
66 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/example/flutter_app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.flutter_app;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | -
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | -
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | -
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | -
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/android/app/src/main/res/mipmap-xxhdpi/logo.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffffff
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
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
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
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 | }
16 |
--------------------------------------------------------------------------------
/assets/images/icon_cling_history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/icon_cling_history.png
--------------------------------------------------------------------------------
/assets/images/icon_main_add_url.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/icon_main_add_url.png
--------------------------------------------------------------------------------
/assets/images/icon_to_cling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/icon_to_cling.png
--------------------------------------------------------------------------------
/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/logo.png
--------------------------------------------------------------------------------
/assets/images/main_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/main_header.png
--------------------------------------------------------------------------------
/assets/images/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/pause.png
--------------------------------------------------------------------------------
/assets/images/playing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/playing.png
--------------------------------------------------------------------------------
/assets/images/shangyiqu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/shangyiqu.png
--------------------------------------------------------------------------------
/assets/images/xiayiqu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/xiayiqu.png
--------------------------------------------------------------------------------
/assets/images/yinliangda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/yinliangda.png
--------------------------------------------------------------------------------
/assets/images/yinliangxiao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/assets/images/yinliangxiao.png
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
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 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
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 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_app
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/home/customviews/GradientButton.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class GradientButton extends StatelessWidget {
4 | GradientButton({
5 | this.colors,
6 | this.width,
7 | this.height,
8 | this.onPressed,
9 | this.borderRadius,
10 | @required this.child,
11 | });
12 |
13 | // 渐变色数组
14 | final List colors;
15 |
16 | // 按钮宽高
17 | final double width;
18 | final double height;
19 |
20 | final Widget child;
21 | final BorderRadius borderRadius;
22 |
23 | //点击回调
24 | final GestureTapCallback onPressed;
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | ThemeData theme = Theme.of(context);
29 |
30 | //确保colors数组不空
31 | List _colors = colors ??
32 | [theme.primaryColor, theme.primaryColorDark ?? theme.primaryColor];
33 |
34 | return DecoratedBox(
35 | decoration: BoxDecoration(
36 | gradient: LinearGradient(colors: _colors),
37 | borderRadius: borderRadius,
38 | ),
39 | child: Material(
40 | type: MaterialType.transparency,
41 | child: InkWell(
42 | splashColor: _colors.last,
43 | highlightColor: Colors.transparent,
44 | borderRadius: borderRadius,
45 | onTap: onPressed,
46 | child: ConstrainedBox(
47 | constraints: BoxConstraints.tightFor(height: height, width: width),
48 | child: Center(
49 | child: Padding(
50 | padding: const EdgeInsets.all(8.0),
51 | child: DefaultTextStyle(
52 | style: TextStyle(fontWeight: FontWeight.bold),
53 | child: child,
54 | ),
55 | ),
56 | ),
57 | ),
58 | ),
59 | ),
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/home/customviews/TurnBox.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/widgets.dart';
2 |
3 | class TurnBox extends StatefulWidget {
4 | const TurnBox({
5 | Key key,
6 | this.turns = .0, //旋转的“圈”数,一圈为360度,如0.25圈即90度
7 | this.speed = 200, //过渡动画执行的总时长
8 | this.child
9 | }) :super(key: key);
10 |
11 | final double turns;
12 | final int speed;
13 | final Widget child;
14 |
15 | @override
16 | _TurnBoxState createState() => new _TurnBoxState();
17 | }
18 |
19 | class _TurnBoxState extends State
20 | with SingleTickerProviderStateMixin {
21 | AnimationController _controller;
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 | _controller = new AnimationController(
27 | vsync: this,
28 | lowerBound: -double.infinity,
29 | upperBound: double.infinity
30 | );
31 | _controller.value = widget.turns;
32 | }
33 |
34 | @override
35 | void dispose() {
36 | _controller.dispose();
37 | super.dispose();
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | return RotationTransition(
43 | turns: _controller,
44 | child: widget.child,
45 | );
46 | }
47 |
48 | @override
49 | void didUpdateWidget(TurnBox oldWidget) {
50 | super.didUpdateWidget(oldWidget);
51 | //旋转角度发生变化时执行过渡动画
52 | if (oldWidget.turns != widget.turns) {
53 | _controller.animateTo(
54 | widget.turns,
55 | duration: Duration(milliseconds: widget.speed??200),
56 | curve: Curves.easeOut,
57 | );
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/lib/home/customviews/file/FileOperationRoute.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'dart:async';
3 | import 'package:flutter/material.dart';
4 | import 'package:path_provider/path_provider.dart';
5 |
6 | class FileOperationRoute extends StatefulWidget {
7 | FileOperationRoute({Key key}) : super(key: key);
8 |
9 | @override
10 | _FileOperationRouteState createState() => new _FileOperationRouteState();
11 | }
12 |
13 | class _FileOperationRouteState extends State {
14 | int _counter;
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 | //从文件读取点击次数
20 | _readCounter().then((int value) {
21 | setState(() {
22 | _counter = value;
23 | });
24 | });
25 | }
26 |
27 | Future _getLocalFile() async {
28 | // 获取应用目录
29 | String dir = (await getApplicationDocumentsDirectory()).path;
30 | return new File('$dir/counter.txt');
31 | }
32 |
33 | Future _readCounter() async {
34 | try {
35 | File file = await _getLocalFile();
36 | // 读取点击次数(以字符串)
37 | String contents = await file.readAsString();
38 | return int.parse(contents);
39 | } on FileSystemException {
40 | return 0;
41 | }
42 | }
43 |
44 | Future _incrementCounter() async {
45 | setState(() {
46 | _counter++;
47 | });
48 | // 将点击次数以字符串类型写到文件中
49 | await (await _getLocalFile()).writeAsString('$_counter');
50 | }
51 |
52 | @override
53 | Widget build(BuildContext context) {
54 | return new Scaffold(
55 | appBar: new AppBar(title: new Text('文件操作')),
56 | body: new Center(
57 | child: new Text('点击了 $_counter 次'),
58 | ),
59 | floatingActionButton: new FloatingActionButton(
60 | onPressed: _incrementCounter,
61 | tooltip: 'Increment',
62 | child: new Icon(Icons.add),
63 | ),
64 | );
65 | }
66 | }
--------------------------------------------------------------------------------
/lib/home/home.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:flutter_app/home/setting/setting.dart';
5 | import 'package:flutter_app/home/remotelocal/remotesource.dart';
6 |
7 |
8 | class HomePage extends StatefulWidget {
9 | @override
10 | _HomePageState createState() => _HomePageState();
11 | }
12 |
13 | class _HomePageState extends State
14 | with SingleTickerProviderStateMixin {
15 | int _selectedIndex = 0;
16 |
17 | List tabs = ["网络", "本地"];
18 |
19 |
20 |
21 |
22 | @override
23 | void initState() {
24 | super.initState();
25 |
26 | if (Platform.isAndroid) {
27 | SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(
28 | statusBarColor: Colors.transparent,
29 | statusBarIconBrightness: Brightness.dark);
30 | SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
31 | }
32 | }
33 |
34 | @override
35 | Widget build(BuildContext context) {
36 | return Scaffold(
37 | body: buildBody(context),
38 | bottomNavigationBar: BottomNavigationBar(
39 | items: [
40 | BottomNavigationBarItem(
41 | icon: Icon(Icons.home), title: Text('Home')),
42 | BottomNavigationBarItem(
43 | icon: Icon(Icons.business), title: Text('Business')),
44 | ],
45 | currentIndex: _selectedIndex,
46 | fixedColor: Colors.blue,
47 | onTap: _onItemTapped,
48 | ));
49 | }
50 |
51 | //配置body页面
52 | Widget buildBody(BuildContext context) {
53 | if(_selectedIndex == 0){
54 | return RemoteSourceChindPage();
55 | }else{
56 | return SettingPage();
57 | }
58 | }
59 |
60 | void _onItemTapped(int index) {
61 | print("----------$index");
62 | setState(() {
63 | _selectedIndex = index;
64 | });
65 | }
66 |
67 |
68 |
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/lib/home/model/SourceBean.dart:
--------------------------------------------------------------------------------
1 | class SourceBean{
2 | String imgSource;
3 | String title;
4 |
5 |
6 | }
--------------------------------------------------------------------------------
/lib/home/remotelocal/child/childdetail/localAudio.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_plugin/flutter_plugin.dart';
4 |
5 | class LocalAudioPage extends StatefulWidget {
6 | @override
7 | _LocalAudioPageState createState() => _LocalAudioPageState();
8 | }
9 |
10 | class _LocalAudioPageState extends State {
11 | List localAudios = [];
12 |
13 | @override
14 | void initState() {
15 | super.initState();
16 | //获取本地文件--图片
17 | getAudioDate();
18 | }
19 |
20 | showLoadingDialog() {
21 | return localAudios.length == 0;
22 | }
23 |
24 | getBody() {
25 | if (showLoadingDialog()) {
26 | return getProgressDialog();
27 | } else {
28 | return buildImageView();
29 | }
30 | }
31 |
32 | getProgressDialog() {
33 | return new Center(child: new CircularProgressIndicator());
34 | }
35 |
36 | @override
37 | Widget build(BuildContext context) {
38 | return Container(
39 | color: Colors.white,
40 | child: Column(
41 | children: [Expanded(child: getBody())],
42 | ),
43 | );
44 | }
45 |
46 | Widget buildImageView() {
47 | return Padding(
48 | padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
49 | child: GridView.builder(
50 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
51 | crossAxisCount: 2,
52 | childAspectRatio: 1,
53 | crossAxisSpacing: 20,
54 | ),
55 | itemCount: localAudios.length,
56 | itemBuilder: (context, index) {
57 | return Column(
58 | children: [
59 | buildImage(index),
60 | Padding(
61 | padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
62 | child: Text(
63 | localAudios.length == 0 ? "" : localAudios[index]["title"],
64 | style: TextStyle(),
65 | maxLines: 1,
66 | overflow: TextOverflow.ellipsis,
67 | ),
68 | ),
69 | ],
70 | );
71 | },
72 | ),
73 | );
74 | }
75 |
76 | Widget buildImage(int index) {
77 | return Expanded(child: Image.asset("assets/images/logo.png"));
78 | }
79 |
80 | getAudioDate() async {
81 | List d = await FlutterPlugin.localAudios;
82 | setState(() {
83 | localAudios = d;
84 | print("---------getImageDate-----------${localAudios.length}");
85 | });
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/lib/home/remotelocal/child/childdetail/localVideo.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_plugin/flutter_plugin.dart';
4 |
5 | class LocalVideoPage extends StatefulWidget {
6 | @override
7 | _LocalVideoPageState createState() => _LocalVideoPageState();
8 | }
9 |
10 | class _LocalVideoPageState extends State {
11 | List localVideo = [];
12 |
13 | @override
14 | void initState() {
15 | super.initState();
16 | //获取本地文件--图片
17 | getVideoDate();
18 | }
19 |
20 | showLoadingDialog() {
21 | return localVideo.length == 0;
22 | }
23 |
24 | getBody() {
25 | if (showLoadingDialog()) {
26 | return getProgressDialog();
27 | } else {
28 | return buildImageView();
29 | }
30 | }
31 |
32 | getProgressDialog() {
33 | return new Center(child: new CircularProgressIndicator());
34 | }
35 |
36 | @override
37 | Widget build(BuildContext context) {
38 | return Container(
39 | color: Colors.white,
40 | child: Column(
41 | children: [Expanded(child: getBody())],
42 | ),
43 | );
44 | }
45 |
46 | Widget buildImageView() {
47 | return Padding(
48 | padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
49 | child: GridView.builder(
50 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
51 | crossAxisCount: 2,
52 | childAspectRatio: 1,
53 | crossAxisSpacing: 20,
54 | ),
55 | itemCount: 20,
56 | itemBuilder: (context, index) {
57 | return GestureDetector(
58 | onTap: (){
59 | var argument = {
60 | 'creator': localVideo[index]["creator"],
61 | 'title': localVideo[index]["title"],
62 | 'id': localVideo[index]["id"],
63 | 'refID': localVideo[index]["refID"],
64 | 'resources': localVideo[index]["resources"][0],
65 | };
66 |
67 |
68 | print("---------------${argument.toString()}");
69 | FlutterPlugin.playLocalSource(argument);
70 | },
71 | child: Column(
72 | children: [
73 | buildImage(index),
74 | Padding(
75 | padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
76 | child: Text(
77 | localVideo.length == 0 ? "" : localVideo[index]["title"],
78 | style: TextStyle(),
79 | maxLines: 1,
80 | overflow: TextOverflow.ellipsis,
81 | ),
82 | ),
83 | ],
84 | ),
85 | );
86 | },
87 | ),
88 | );
89 | }
90 |
91 | Widget buildImage(int index) {
92 | return Expanded(child: Image.asset("assets/images/logo.png"));
93 | }
94 |
95 | getVideoDate() async {
96 | List d = await FlutterPlugin.localVideos;
97 | setState(() {
98 | localVideo = d;
99 | print("---------getImageDate-----------${localVideo.length}");
100 | });
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/lib/home/remotelocal/child/localsource.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/home/remotelocal/child/childdetail/localAudio.dart';
3 | import 'package:flutter_app/home/remotelocal/child/childdetail/localImage.dart';
4 | import 'package:flutter_app/home/remotelocal/child/childdetail/localVideo.dart';
5 | import 'package:flutter_plugin/flutter_plugin.dart';
6 |
7 | class LocalSourcePage extends StatefulWidget {
8 | @override
9 | _LocalSourcePageState createState() => _LocalSourcePageState();
10 | }
11 |
12 | class _LocalSourcePageState extends State {
13 | int position = 30;
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Column(
18 | children: [
19 | Container(
20 | color: Colors.white,
21 | child: Container(
22 | child: Row(
23 | mainAxisAlignment: MainAxisAlignment.spaceAround,
24 | children: [
25 | GestureDetector(
26 | onTap: () {
27 | resetPosition(30);
28 | },
29 | child: Container(
30 | padding: EdgeInsets.fromLTRB(20, 20, 20, 5),
31 | child: Text(
32 | "图片",
33 | style: TextStyle(
34 | fontWeight: position == 30
35 | ? FontWeight.bold
36 | : FontWeight.normal),
37 | ),
38 | ),
39 | ),
40 | GestureDetector(
41 | onTap: () {
42 | resetPosition(20);
43 | },
44 | child: Container(
45 | padding: EdgeInsets.fromLTRB(20, 20, 20, 5),
46 | child: Text(
47 | "视频",
48 | style: TextStyle(
49 | fontWeight: position == 20
50 | ? FontWeight.bold
51 | : FontWeight.normal),
52 | ),
53 | ),
54 | ),
55 | GestureDetector(
56 | onTap: () {
57 | resetPosition(10);
58 | },
59 | child: Container(
60 | padding: EdgeInsets.fromLTRB(20, 20, 20, 5),
61 | child: Text(
62 | "音频",
63 | style: TextStyle(
64 | fontWeight: position == 10
65 | ? FontWeight.bold
66 | : FontWeight.normal),
67 | ),
68 | ),
69 | ),
70 | ],
71 | ),
72 | ),
73 | ),
74 | Expanded(child: buildView())
75 | ],
76 | );
77 | }
78 |
79 | void resetPosition(int pos) {
80 | position = pos;
81 | print("-------------position $position ");
82 | FlutterPlugin.stopPlay();
83 | setState(() {});
84 | }
85 |
86 | Widget buildView() {
87 | if (position == 30) {
88 | return LocalImagePage();
89 | } else if (position == 20) {
90 | return LocalVideoPage();
91 | } else {
92 | return LocalAudioPage();
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/lib/home/routeani/SlideRightRoute.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SlideRightRoute extends PageRouteBuilder {
4 | final Widget page;
5 |
6 | SlideRightRoute({this.page})
7 | : super(
8 | pageBuilder: (
9 | BuildContext context,
10 | Animation animation,
11 | Animation secondaryAnimation,
12 | ) =>
13 | page,
14 | transitionsBuilder: (
15 | BuildContext context,
16 | Animation animation,
17 | Animation secondaryAnimation,
18 | Widget child,
19 | ) =>
20 | SlideTransition(
21 | position: Tween(
22 | begin: const Offset(1, 0),
23 | end: Offset.zero,
24 | ).animate(animation),
25 | child: child,
26 | ),
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/lib/home/setting/setting.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/home/customviews/GradientButton.dart';
3 | import 'package:flutter_app/home/customviews/TurnBox.dart';
4 | import 'package:flutter_app/home/customviews/file/FileOperationRoute.dart';
5 |
6 | class SettingPage extends StatefulWidget {
7 | @override
8 | _SettingPageState createState() => _SettingPageState();
9 | }
10 |
11 | class _SettingPageState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | padding: EdgeInsets.fromLTRB(0, 60, 0, 0),
16 | child: buildPage(),
17 | );
18 | }
19 | double _turns = .0;
20 | Widget buildPage() {
21 |
22 | //
23 | // return GradientButton(
24 | // colors: [Colors.orange, Colors.red],
25 | // height: 50.0,
26 | // child: Text("Submit"),
27 | // onPressed: (){
28 | // print("GradientButton");
29 | // },
30 | // );
31 |
32 |
33 | // return Column(
34 | // children: [
35 | // TurnBox(
36 | // turns: _turns,
37 | // speed: 500,
38 | // child: Icon(Icons.refresh, size: 50,),
39 | // ),
40 | // TurnBox(
41 | // turns: _turns,
42 | // speed: 1000,
43 | // child: Icon(Icons.refresh, size: 150.0,),
44 | // ),
45 | // RaisedButton(
46 | // child: Text("顺时针旋转1/5圈"),
47 | // onPressed: () {
48 | // setState(() {
49 | // _turns += .2;
50 | // });
51 | // },
52 | // ),
53 | // RaisedButton(
54 | // child: Text("逆时针旋转1/5圈"),
55 | // onPressed: () {
56 | // setState(() {
57 | // _turns -= .2;
58 | // });
59 | // },
60 | // )
61 | // ],
62 | // );
63 |
64 | return FileOperationRoute();
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/.metadata:
--------------------------------------------------------------------------------
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: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/README.md:
--------------------------------------------------------------------------------
1 | # flutter_dlan
2 |
3 | A new Flutter plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter
8 | [plug-in package](https://flutter.io/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.io/docs), which offers tutorials,
14 | samples, guidance on mobile development, and a full API reference.
15 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'tech.shmy.plugin.dlan.flutter_dlan'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.2.1'
13 | }
14 | }
15 |
16 | rootProject.allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | mavenCentral()
21 | mavenLocal()
22 | maven {
23 | url 'http://4thline.org/m2'
24 | }
25 | }
26 | }
27 |
28 | apply plugin: 'com.android.library'
29 |
30 | android {
31 | // packagingOptions {
32 | // exclude 'META-INF/LICENSE.txt'
33 | // exclude 'META-INF/beans.xml'
34 | //
35 | // }
36 | compileSdkVersion 28
37 |
38 | defaultConfig {
39 | minSdkVersion 16
40 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
41 | }
42 | lintOptions {
43 | disable 'InvalidPackage'
44 | }
45 |
46 | }
47 |
48 | dependencies {
49 | implementation fileTree(dir: 'libs', include: ['*.jar'])
50 | // Cling
51 | implementation group: 'org.fourthline.cling', name: 'cling-core', version: '2.1.2-SNAPSHOT'
52 | implementation group: 'org.fourthline.cling', name: 'cling-support', version: '2.1.2-SNAPSHOT'
53 | implementation group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.18.v20150929'
54 | implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.18.v20150929'
55 | implementation group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.18.v20150929'
56 | }
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Mar 08 18:12:25 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-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'flutter_dlan'
2 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/android/src/main/java/tech/shmy/plugin/dlan/flutter_dlan/BrowseRegistryListener.java:
--------------------------------------------------------------------------------
1 | package tech.shmy.plugin.dlan.flutter_dlan;
2 |
3 | import org.fourthline.cling.model.meta.Device;
4 | import org.fourthline.cling.model.meta.Service;
5 | import org.fourthline.cling.model.types.ServiceType;
6 | import org.fourthline.cling.model.types.UDAServiceType;
7 | import org.fourthline.cling.registry.DefaultRegistryListener;
8 | import org.fourthline.cling.registry.Registry;
9 |
10 | import java.net.URL;
11 | import java.util.ArrayList;
12 | import java.util.HashMap;
13 | import android.os.Handler;
14 | import android.os.Looper;
15 |
16 | import io.flutter.plugin.common.EventChannel.EventSink;
17 |
18 | public class BrowseRegistryListener extends DefaultRegistryListener {
19 | private ArrayList mDeviceList = new ArrayList<>();
20 | private ArrayList flutterDeviceList = new ArrayList<>();
21 | private static final ServiceType AV_TRANSPORT_SERVICE = new UDAServiceType("AVTransport");
22 | public static EventSink eventSink;
23 |
24 | private Handler handler = new Handler(Looper.getMainLooper());
25 |
26 | Service getDeviceForUuid(String uuid) {
27 | int i = 0;
28 | for (; i < mDeviceList.size(); i ++) {
29 | String currentUuid = mDeviceList.get(i).getIdentity().getUdn().getIdentifierString();
30 | if (currentUuid.equals(uuid)) {
31 | break;
32 | }
33 | }
34 | System.out.println(mDeviceList.get(i));
35 | return mDeviceList.get(i).findService(AV_TRANSPORT_SERVICE);
36 | }
37 | ArrayList getDevices() {
38 | return this.flutterDeviceList;
39 | }
40 | void clearDevices() {
41 | this.mDeviceList.clear();
42 | this.flutterDeviceList.clear();
43 | }
44 | @Override
45 | public void deviceAdded(Registry registry, Device device) {
46 | URL ip = device.getDetails().getBaseURL();
47 | // if (ip == null) {
48 | // return;
49 | // }
50 | HashMap fd = new HashMap();
51 | fd.put("name", device.getDetails().getFriendlyName());
52 | // fd.put("display", device.getDisplayString());
53 | fd.put("uuid", device.getIdentity().getUdn().getIdentifierString());
54 | fd.put("ip", ip == null ? "Unknown" : ip.toString());
55 | if (flutterDeviceList.indexOf(fd) != -1) {
56 | return;
57 | }
58 | super.deviceAdded(registry, device);
59 | mDeviceList.add(device);
60 | flutterDeviceList.add(fd);
61 | System.out.println("-----get device-------");
62 | System.out.println(device);
63 | System.out.println(mDeviceList);
64 | handler.post(
65 | new Runnable() {
66 | @Override
67 | public void run() {
68 | if (BrowseRegistryListener.eventSink != null) {
69 | BrowseRegistryListener.eventSink.success(flutterDeviceList);
70 | }
71 | }
72 | });
73 | }
74 |
75 | @Override
76 | public void deviceRemoved(Registry registry, Device device) {
77 | super.deviceRemoved(registry, device);
78 | mDeviceList.remove(device);
79 | for (int i = 0; i < flutterDeviceList.size(); i ++) {
80 | HashMap m = flutterDeviceList.get(i);
81 | if (device.getIdentity().getUdn().getIdentifierString() == m.get("uuid")) {
82 | flutterDeviceList.remove(i);
83 | break;
84 | }
85 | }
86 | if (BrowseRegistryListener.eventSink != null) {
87 | BrowseRegistryListener.eventSink.success(flutterDeviceList);
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/.gitignore:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/.metadata:
--------------------------------------------------------------------------------
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: 8661d8aecd626f7f57ccbcb735553edc05a2e713
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_dlan_example
2 |
3 | Demonstrates how to use the flutter_dlan 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.io/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.io/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/build.gradle:
--------------------------------------------------------------------------------
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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 | // packagingOptions {
30 | // exclude 'META-INF/LICENSE.txt'
31 | // exclude 'META-INF/beans.xml'
32 | //
33 | // }
34 | lintOptions {
35 | disable 'InvalidPackage'
36 | }
37 |
38 | defaultConfig {
39 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
40 | applicationId "tech.shmy.plugin.dlan.flutter_dlan_example"
41 | minSdkVersion 16
42 | targetSdkVersion 28
43 | versionCode flutterVersionCode.toInteger()
44 | versionName flutterVersionName
45 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | testImplementation 'junit:junit:4.12'
63 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
64 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
65 | }
66 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/java/tech/shmy/plugin/dlan/flutter_dlan_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package tech.shmy.plugin.dlan.flutter_dlan_example;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
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
7 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/android/settings.gradle:
--------------------------------------------------------------------------------
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 | }
16 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37 | # referring to absolute paths on developers' machines.
38 | system('rm -rf .symlinks')
39 | system('mkdir -p .symlinks/plugins')
40 |
41 | # Flutter Pods
42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43 | if generated_xcode_build_settings.empty?
44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45 | end
46 | generated_xcode_build_settings.map { |p|
47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48 | symlink = File.join('.symlinks', 'flutter')
49 | File.symlink(File.dirname(p[:path]), symlink)
50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
51 | end
52 | }
53 |
54 | # Plugin Pods
55 | plugin_pods = parse_KV_file('../.flutter-plugins')
56 | plugin_pods.map { |p|
57 | symlink = File.join('.symlinks', 'plugins', p[:name])
58 | File.symlink(p[:path], symlink)
59 | pod p[:name], :path => File.join(symlink, 'ios')
60 | }
61 | end
62 |
63 | post_install do |installer|
64 | installer.pods_project.targets.each do |target|
65 | target.build_configurations.each do |config|
66 | config.build_settings['ENABLE_BITCODE'] = 'NO'
67 | end
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
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 | }
123 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
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 | }
24 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_dlan_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:async';
3 |
4 | import 'package:flutter/services.dart';
5 | import 'package:flutter_dlan/flutter_dlan.dart';
6 |
7 | void main() => runApp(MyApp());
8 |
9 | class LifecycleEventHandler extends WidgetsBindingObserver {
10 |
11 | LifecycleEventHandler();
12 |
13 | @override
14 | Future didChangeAppLifecycleState(AppLifecycleState state) async {
15 | print('-------' + state.toString() + '-------');
16 | switch (state) {
17 | case AppLifecycleState.inactive:
18 | case AppLifecycleState.paused:
19 | await FlutterDlan.stop();
20 | break;
21 | case AppLifecycleState.suspending:
22 | break;
23 | case AppLifecycleState.resumed:
24 | await FlutterDlan.search();
25 | break;
26 | }
27 | }
28 | }
29 |
30 | class MyApp extends StatefulWidget {
31 | @override
32 | _MyAppState createState() => _MyAppState();
33 | }
34 |
35 | class _MyAppState extends State {
36 | List a = [];
37 |
38 | @override
39 | void initState() {
40 | WidgetsBinding.instance.addObserver(LifecycleEventHandler());
41 | super.initState();
42 | FlutterDlan.init((List data) {
43 | setState(() {
44 | a = data;
45 | });
46 | });
47 | }
48 |
49 | @override
50 | void dispose() {
51 | super.dispose();
52 | print("dispose");
53 | }
54 |
55 | // Platform messages are asynchronous, so we initialize in an async method.
56 |
57 | @override
58 | Widget build(BuildContext context) {
59 | return MaterialApp(
60 | home: Scaffold(
61 | appBar: AppBar(
62 | title: const Text('Plugin example app'),
63 | ),
64 | body: Center(
65 | child: Column(
66 | children: [
67 | MaterialButton(
68 | child: Text("search"),
69 | onPressed: () async {
70 | await FlutterDlan.search();
71 | },
72 | ),
73 | MaterialButton(
74 | child: Text("getList"),
75 | onPressed: () async {
76 | print(await FlutterDlan.devices);
77 | }
78 | ),
79 | ]
80 | ..addAll(a.map((item) {
81 | return ListTile(
82 | title: Text(item["name"]),
83 | onTap: () async {
84 | await FlutterDlan.playUrl(item["uuid"],
85 | "https://youku.kuyun-leshi.com/ppvod/01E2D5D49022A600A67DB3F0CE15EF92.m3u8");
86 | },
87 | );
88 | })),
89 | ),
90 | ),
91 | ),
92 | );
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_dlan_example
2 | description: Demonstrates how to use the flutter_dlan 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 | flutter_dlan:
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.io/assets-and-images/#resolution-aware.
41 |
42 | # For details regarding adding assets from package dependencies, see
43 | # https://flutter.io/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.io/custom-fonts/#from-packages
64 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/example/test/widget_test.dart:
--------------------------------------------------------------------------------
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:flutter_dlan_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 | }
28 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/ios/.gitignore:
--------------------------------------------------------------------------------
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
37 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_dlan/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/plugins/flutter_dlan/ios/Classes/FlutterDlanPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface FlutterDlanPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/ios/Classes/FlutterDlanPlugin.m:
--------------------------------------------------------------------------------
1 | #import "FlutterDlanPlugin.h"
2 |
3 | @implementation FlutterDlanPlugin
4 | + (void)registerWithRegistrar:(NSObject*)registrar {
5 | FlutterMethodChannel* channel = [FlutterMethodChannel
6 | methodChannelWithName:@"flutter_dlan"
7 | binaryMessenger:[registrar messenger]];
8 | FlutterDlanPlugin* instance = [[FlutterDlanPlugin alloc] init];
9 | [registrar addMethodCallDelegate:instance channel:channel];
10 | }
11 |
12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13 | if ([@"getPlatformVersion" isEqualToString:call.method]) {
14 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15 | } else {
16 | result(FlutterMethodNotImplemented);
17 | }
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/ios/flutter_dlan.podspec:
--------------------------------------------------------------------------------
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 = 'flutter_dlan'
6 | s.version = '0.0.1'
7 | s.summary = 'A new Flutter plugin.'
8 | s.description = <<-DESC
9 | A new Flutter plugin.
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 |
22 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/lib/flutter_dlan.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/services.dart';
4 |
5 | class FlutterDlan {
6 | static const CHANNEL_NAME = "tech.shmy.plugins/flutter_dlan/";
7 | static const MethodChannel methodChannel = const MethodChannel(CHANNEL_NAME + "method_channel");
8 | static const EventChannel eventChannel = const EventChannel(CHANNEL_NAME + "event_channel");
9 | static StreamSubscription eventSubscription;
10 | static init (cb) {
11 | eventSubscription = eventChannel.receiveBroadcastStream().listen((dynamic data) {
12 | cb(data);
13 | });
14 | }
15 | static Future> get devices async {
16 | final List devices = await methodChannel.invokeMethod('getList');
17 | return devices;
18 | }
19 | static search() async {
20 | await methodChannel.invokeMethod('search');
21 | }
22 | static stop() async {
23 | await methodChannel.invokeMethod('stop');
24 | }
25 |
26 | static playUrl(String uuid, String url) async {
27 | await methodChannel.invokeMethod('playUrl', {
28 | "uuid": uuid,
29 | "url": url,
30 | });
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_dlan
2 | description: A new Flutter plugin.
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: tech.shmy.plugin.dlan.flutter_dlan
29 | pluginClass: FlutterDlanPlugin
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.io/assets-and-images/#from-packages
38 | #
39 | # An image asset can refer to one or more resolution-specific "variants", see
40 | # https://flutter.io/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.io/custom-fonts/#from-packages
61 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/test/flutter_dlan_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:flutter_dlan/flutter_dlan.dart';
4 |
5 | void main() {
6 | const MethodChannel channel = MethodChannel('flutter_dlan');
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 FlutterDlan.platformVersion, '42');
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/plugins/flutter_dlan/todo.md:
--------------------------------------------------------------------------------
1 | [x] 优化java代码
2 | [x] 退出清除服务
--------------------------------------------------------------------------------
/plugins/flutter_plugin/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/.metadata:
--------------------------------------------------------------------------------
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: 20e59316b8b8474554b38493b8ca888794b0234a
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/README.md:
--------------------------------------------------------------------------------
1 | # flutter_plugin
2 |
3 | A new Flutter plugin.
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.
15 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.example.flutter_plugin'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.2.1'
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | maven { url "https://jitpack.io" }
20 | mavenCentral()
21 | mavenLocal()
22 | maven {
23 | url 'http://4thline.org/m2'
24 | }
25 | }
26 | }
27 |
28 | apply plugin: 'com.android.library'
29 |
30 | android {
31 | compileSdkVersion 28
32 |
33 | defaultConfig {
34 | minSdkVersion 16
35 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
36 | }
37 | lintOptions {
38 | disable 'InvalidPackage'
39 | }
40 | }
41 | dependencies {
42 |
43 | api 'com.vmloft.library:vmtools:0.1.2'
44 | // Cling
45 | api "org.greenrobot:eventbus:3.1.1"
46 | // event bus
47 | implementation group: 'org.fourthline.cling', name: 'cling-core', version: '2.1.2-SNAPSHOT'
48 | implementation group: 'org.fourthline.cling', name: 'cling-support', version: '2.1.2-SNAPSHOT'
49 | implementation group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.18.v20150929'
50 | implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.18.v20150929'
51 | implementation group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.18.v20150929'
52 |
53 | //数据解析
54 | api 'com.alibaba:fastjson:1.1.68.android'
55 | }
56 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Sep 06 09:28:52 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
7 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'flutter_plugin'
2 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/VConstants.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2;
2 |
3 | /**
4 | * Created by lzan13 on 2018/3/10.
5 | * 常量类
6 | */
7 | public class VConstants {
8 |
9 | public static final int JETTY_SERVER_PORT = 55677;
10 |
11 | public static final String ROOT_OBJECT_ID = "0";
12 |
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/VError.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2;
2 |
3 | /**
4 | * Created by lzan13 on 2018/3/19.
5 | */
6 |
7 | public class VError {
8 | public static int NO_ERROR = 0;
9 | public static int UNKNOWN = 1;
10 | public static int SYSTEM = 2;
11 |
12 | public static int DEVICE_IS_NULL = 100;
13 | public static int SERVICE_IS_NULL = 101;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/callback/AVTransportCallback.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.callback;
2 |
3 | import com.tool.clinglibrary2.entity.AVTransportInfo;
4 |
5 | import org.fourthline.cling.model.meta.Service;
6 | import org.fourthline.cling.support.avtransport.lastchange.AVTransportLastChangeParser;
7 | import org.fourthline.cling.support.lastchange.EventedValue;
8 | import org.fourthline.cling.support.lastchange.LastChangeParser;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * Created by lzan13 on 2018/3/5.
14 | * 投屏传输状态相关回调,这里主要回调播放状态,以及播放进度,播放资源的整体时间,
15 | * 但是经测试这个进度和整体时间只在 AirPin 上有效,小米盒子和天猫盒子无效
16 | */
17 | public abstract class AVTransportCallback extends BaseSubscriptionCallback {
18 | private final String TAG = this.getClass().getSimpleName();
19 | private final String AVT_STATE = "TransportState";
20 | private final String AVT_DURATION = "CurrentMediaDuration";
21 | private final String AVT_RELATIVE_TIME = "RelativeTimePosition";
22 | private final String AVT_ABSOLUTE_TIME = "AbsoluteTimePosition";
23 |
24 |
25 | protected AVTransportCallback(Service service) {
26 | super(service);
27 | }
28 |
29 | @Override
30 | protected LastChangeParser getLastChangeParser() {
31 | return new AVTransportLastChangeParser();
32 | }
33 |
34 | @Override
35 | protected void onReceived(List values) {
36 | AVTransportInfo info = new AVTransportInfo();
37 | EventedValue value = values.get(0);
38 | String name = value.getName();
39 | Object obj = value.getValue();
40 |
41 | if (AVT_STATE.equals(name)) {
42 | info.setState(value.getValue().toString());
43 | } else if (AVT_DURATION.equals(name)) {
44 | info.setMediaDuration(value.getValue().toString());
45 | } else if (AVT_RELATIVE_TIME.equals(name)) {
46 | // info.setTimePosition((String) value.getValue());
47 | } else if (AVT_ABSOLUTE_TIME.equals(name)) {
48 | info.setTimePosition(value.getValue().toString());
49 | }
50 |
51 | received(info);
52 | }
53 |
54 | protected abstract void received(AVTransportInfo info);
55 | }
56 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/callback/BaseSubscriptionCallback.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.callback;
2 |
3 |
4 | import org.fourthline.cling.controlpoint.SubscriptionCallback;
5 | import org.fourthline.cling.model.gena.CancelReason;
6 | import org.fourthline.cling.model.gena.GENASubscription;
7 | import org.fourthline.cling.model.message.UpnpResponse;
8 | import org.fourthline.cling.model.meta.Service;
9 | import org.fourthline.cling.model.state.StateVariableValue;
10 | import org.fourthline.cling.support.lastchange.Event;
11 | import org.fourthline.cling.support.lastchange.EventedValue;
12 | import org.fourthline.cling.support.lastchange.InstanceID;
13 | import org.fourthline.cling.support.lastchange.LastChangeParser;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 | import java.util.Map;
18 |
19 | /**
20 | * Created by lzan13 on 2018/3/9.
21 | */
22 | public abstract class BaseSubscriptionCallback extends SubscriptionCallback {
23 |
24 | // 订阅持续时间 秒,这里设置3小时
25 | private static final int SUB_DURATION = 60 * 60 * 3;
26 |
27 | protected BaseSubscriptionCallback(Service service) {
28 | this(service, SUB_DURATION);
29 | }
30 |
31 | protected BaseSubscriptionCallback(Service service, int requestedDurationSeconds) {
32 | super(service, requestedDurationSeconds);
33 | }
34 |
35 | @Override
36 | protected void failed(GENASubscription subscription, UpnpResponse responseStatus, Exception exception, String defaultMsg) {
37 | }
38 |
39 | @Override
40 | protected void ended(GENASubscription subscription, CancelReason reason, UpnpResponse responseStatus) {
41 | }
42 |
43 | @Override
44 | protected void established(GENASubscription subscription) {}
45 |
46 | @Override
47 | protected void eventsMissed(GENASubscription subscription, int numberOfMissedEvents) {}
48 |
49 | @Override
50 | protected void eventReceived(GENASubscription subscription) {
51 | Map values = subscription.getCurrentValues();
52 | if (values != null && values.containsKey("LastChange")) {
53 | LastChangeParser parser = getLastChangeParser();
54 | String lastChangeValue = values.get("LastChange").toString();
55 | try {
56 | Event event = parser.parse(lastChangeValue);
57 | List ids = event.getInstanceIDs();
58 | List eventValues = new ArrayList<>();
59 | for (InstanceID id : ids) {
60 | eventValues.addAll(id.getValues());
61 | }
62 | onReceived(eventValues);
63 | } catch (Exception e) {
64 | e.printStackTrace();
65 | return;
66 | }
67 | }
68 | }
69 |
70 | protected abstract LastChangeParser getLastChangeParser();
71 |
72 | protected abstract void onReceived(List values);
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/callback/ContentBrowseCallback.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.callback;
2 |
3 | import org.fourthline.cling.model.meta.Service;
4 | import org.fourthline.cling.support.contentdirectory.callback.Browse;
5 | import org.fourthline.cling.support.model.BrowseFlag;
6 | import org.fourthline.cling.support.model.SortCriterion;
7 |
8 | /**
9 | * Created by lzan13 on 2018/3/18.
10 | */
11 | public abstract class ContentBrowseCallback extends Browse {
12 |
13 | public ContentBrowseCallback(Service service, String containerId) {
14 | super(service, containerId, BrowseFlag.DIRECT_CHILDREN, "*", 0, null,
15 | new SortCriterion(true, "dc:title"));
16 | }
17 |
18 | @Override
19 | public void updateStatus(Status status) {
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/callback/ControlCallback.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.callback;
2 |
3 | /**
4 | * Created by lzan13 on 2018/3/10.
5 | * 投屏控制回调
6 | */
7 | public interface ControlCallback {
8 | void onSuccess();
9 |
10 | void onError(int code, String msg);
11 | }
12 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/callback/RenderingControlCallback.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.callback;
2 |
3 | import com.tool.clinglibrary2.entity.RenderingControlInfo;
4 |
5 | import org.fourthline.cling.model.meta.Service;
6 | import org.fourthline.cling.support.lastchange.EventedValue;
7 | import org.fourthline.cling.support.lastchange.LastChangeParser;
8 | import org.fourthline.cling.support.model.Channel;
9 | import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelMute;
10 | import org.fourthline.cling.support.renderingcontrol.lastchange.ChannelVolume;
11 | import org.fourthline.cling.support.renderingcontrol.lastchange.RenderingControlLastChangeParser;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * Created by lzan13 on 2018/3/5.
17 | * 投屏播放控制相关回调,这里主要会回调音量和是否静音
18 | */
19 | public abstract class RenderingControlCallback extends BaseSubscriptionCallback {
20 | private final String TAG = this.getClass().getSimpleName();
21 |
22 | protected RenderingControlCallback(Service service) {
23 | super(service);
24 | }
25 |
26 | @Override
27 | protected LastChangeParser getLastChangeParser() {
28 | return new RenderingControlLastChangeParser();
29 | }
30 |
31 | @Override
32 | protected void onReceived(List values) {
33 | RenderingControlInfo info = new RenderingControlInfo();
34 | for (EventedValue entry : values) {
35 | if ("Mute".equals(entry.getName())) {
36 | Object obj = entry.getValue();
37 | if (obj instanceof ChannelMute) {
38 | ChannelMute cm = (ChannelMute) obj;
39 | if (Channel.Master.equals(cm.getChannel())) {
40 | info.setMute(cm.getMute());
41 | }
42 | }
43 | }
44 | if ("Volume".equals(entry.getName())) {
45 | Object obj = entry.getValue();
46 | if (obj instanceof ChannelVolume) {
47 | ChannelVolume cv = (ChannelVolume) obj;
48 | if (Channel.Master.equals(cv.getChannel())) {
49 | info.setVolume(cv.getVolume());
50 | }
51 | }
52 | }
53 | if ("PresetNameList".equals(entry.getName())) {
54 | Object obj = entry.getValue();
55 | info.setPresetNameList(obj.toString());
56 | }
57 | }
58 | received(info);
59 | }
60 |
61 | protected abstract void received(RenderingControlInfo info);
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/entity/AVTransportInfo.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.entity;
2 |
3 | /**
4 | * Created by lzan13 on 2018/4/11.
5 | */
6 | public class AVTransportInfo {
7 |
8 | public static String TRANSITIONING = "TRANSITIONING";
9 | public static String PLAYING = "PLAYING";
10 | public static String PAUSED_PLAYBACK = "PAUSED_PLAYBACK";
11 | public static String STOPPED = "STOPPED";
12 |
13 | private String state;
14 | private String mediaDuration;
15 | private String timePosition;
16 |
17 | public AVTransportInfo() {}
18 |
19 | public String getState() {
20 | return state;
21 | }
22 |
23 | public void setState(String state) {
24 | this.state = state;
25 | }
26 |
27 | public String getMediaDuration() {
28 | return mediaDuration;
29 | }
30 |
31 | public void setMediaDuration(String mediaDuration) {
32 | this.mediaDuration = mediaDuration;
33 | }
34 |
35 | public String getTimePosition() {
36 | return timePosition;
37 | }
38 |
39 | public void setTimePosition(String timePosition) {
40 | this.timePosition = timePosition;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/entity/ClingDevice.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.entity;
2 |
3 | import org.fourthline.cling.model.meta.Device;
4 |
5 | /**
6 | * Created by lzan13 on 2018/3/5.
7 | */
8 | public class ClingDevice {
9 | private Device device;
10 | private boolean isSelected = false;
11 |
12 | public ClingDevice(Device device) {
13 | this.device = device;
14 | }
15 |
16 | public Device getDevice() {
17 | return device;
18 | }
19 |
20 | public boolean isSelected() {
21 | return isSelected;
22 | }
23 |
24 | public void setSelected(boolean selected) {
25 | isSelected = selected;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/entity/RemoteItem.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.entity;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by lzan13 on 2018/3/24.
7 | * 网络资源实体类
8 | */
9 | public class RemoteItem {
10 | private String title;
11 | private String id;
12 | private String creator;
13 | private long size;
14 | private String duration;
15 | private String resolution;
16 | private String url;
17 | private List urlLists;
18 |
19 | public RemoteItem(String title, String id, String creator, long size, String duration,
20 | String resolution, String url) {
21 | setTitle(title);
22 | setId(id);
23 | setCreator(creator);
24 | setSize(size);
25 | setDuration(duration);
26 | setResolution(resolution);
27 | setUrl(url);
28 | }
29 |
30 |
31 | public List getUrlLists() {
32 | return urlLists;
33 | }
34 |
35 | public void setUrlLists(List urlLists) {
36 | this.urlLists = urlLists;
37 | }
38 |
39 | public String getTitle() {
40 | return title;
41 | }
42 |
43 | public void setTitle(String title) {
44 | this.title = title;
45 | }
46 |
47 | public String getId() {
48 | return id;
49 | }
50 |
51 | public void setId(String id) {
52 | this.id = id;
53 | }
54 |
55 | public String getCreator() {
56 | return creator;
57 | }
58 |
59 | public void setCreator(String creator) {
60 | this.creator = creator;
61 | }
62 |
63 | public long getSize() {
64 | return size;
65 | }
66 |
67 | public void setSize(long size) {
68 | this.size = size;
69 | }
70 |
71 | public String getDuration() {
72 | return duration;
73 | }
74 |
75 | public void setDuration(String duration) {
76 | this.duration = duration;
77 | }
78 |
79 | public String getResolution() {
80 | return resolution;
81 | }
82 |
83 | public void setResolution(String resolution) {
84 | this.resolution = resolution;
85 | }
86 |
87 | public String getUrl() {
88 | return url;
89 | }
90 |
91 | public void setUrl(String url) {
92 | this.url = url;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/entity/RenderingControlInfo.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.entity;
2 |
3 | /**
4 | * Created by lzan13 on 2018/4/11.
5 | */
6 | public class RenderingControlInfo {
7 | private boolean isMute;
8 | private int volume;
9 | private String presetNameList;
10 |
11 | public RenderingControlInfo() {}
12 |
13 | public RenderingControlInfo(boolean mute, int volume) {
14 | this.isMute = mute;
15 | this.volume = volume;
16 | }
17 |
18 | public boolean isMute() {
19 | return isMute;
20 | }
21 |
22 | public void setMute(boolean mute) {
23 | isMute = mute;
24 | }
25 |
26 | public int getVolume() {
27 | return volume;
28 | }
29 |
30 | public void setVolume(int volume) {
31 | this.volume = volume;
32 | }
33 |
34 | public String getPresetNameList() {
35 | return presetNameList;
36 | }
37 |
38 | public void setPresetNameList(String presetNameList) {
39 | this.presetNameList = presetNameList;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/entity/VItem.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.entity;
2 |
3 | import org.fourthline.cling.support.model.DIDLObject;
4 |
5 | /**
6 | * Created by lzan13 on 2018/3/21.
7 | * 自定义 Cling 实体类,
8 | */
9 | public class VItem {
10 |
11 | public final static String ROOT_ID = "0";
12 | public final static String AUDIO_ID = "10";
13 | public final static String VIDEO_ID = "20";
14 | public final static String IMAGE_ID = "30";
15 |
16 | public static final DIDLObject.Class AUDIO_CLASS = new DIDLObject.Class(
17 | "object.container.audio");
18 | public static final DIDLObject.Class IMAGE_CLASS = new DIDLObject.Class(
19 | "object.item.imageItem");
20 | public static final DIDLObject.Class VIDEO_CLASS = new DIDLObject.Class(
21 | "object.container.video");
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/event/ControlEvent.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.event;
2 |
3 |
4 | import com.tool.clinglibrary2.entity.AVTransportInfo;
5 | import com.tool.clinglibrary2.entity.RenderingControlInfo;
6 |
7 | /**
8 | * Created by lzan13 on 2018/4/12.
9 | * 投屏控制相关事件类
10 | */
11 | public class ControlEvent {
12 | private AVTransportInfo avtInfo;
13 | private RenderingControlInfo rcInfo;
14 |
15 | public AVTransportInfo getAvtInfo() {
16 | return avtInfo;
17 | }
18 |
19 | public void setAvtInfo(AVTransportInfo avtInfo) {
20 | this.avtInfo = avtInfo;
21 | }
22 |
23 | public RenderingControlInfo getRcInfo() {
24 | return rcInfo;
25 | }
26 |
27 | public void setRcInfo(RenderingControlInfo rcInfo) {
28 | this.rcInfo = rcInfo;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/event/CurrentDeviceEvent.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.event;
2 |
3 |
4 | import com.tool.clinglibrary2.entity.ClingDevice;
5 |
6 | /**
7 | * Created by lzan13 on 2018/3/9.
8 | * 设备相关事件类
9 | */
10 | public class CurrentDeviceEvent {
11 | private ClingDevice clingDevice;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/event/DIDLEvent.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.event;
2 |
3 | import org.fourthline.cling.support.model.DIDLContent;
4 |
5 | /**
6 | * Created by lzan13 on 2018/3/19.
7 | * DLNA 本地媒体服务内容变化实践类
8 | */
9 | public class DIDLEvent {
10 | public DIDLContent content;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/event/DeviceEvent.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.event;
2 |
3 |
4 | import com.tool.clinglibrary2.entity.ClingDevice;
5 |
6 | /**
7 | * Created by lzan13 on 2018/3/9.
8 | * 设备相关事件类
9 | */
10 | public class DeviceEvent {
11 | private ClingDevice clingDevice;
12 | // 变化类型,
13 | private int type = 0;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/listener/ClingRegistryListener.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.listener;
2 |
3 | import com.tool.clinglibrary2.manager.DeviceManager;
4 |
5 | import org.fourthline.cling.model.meta.Device;
6 | import org.fourthline.cling.model.meta.LocalDevice;
7 | import org.fourthline.cling.model.meta.RemoteDevice;
8 | import org.fourthline.cling.registry.DefaultRegistryListener;
9 | import org.fourthline.cling.registry.Registry;
10 |
11 | /**
12 | * Created by lzan13 on 2018/3/9.
13 | * 监听当前局域网设备变化
14 | */
15 | public class ClingRegistryListener extends DefaultRegistryListener {
16 | @Override
17 | public void remoteDeviceDiscoveryStarted(Registry registry, RemoteDevice device) {
18 | // onDeviceAdded(device);
19 | }
20 |
21 | @Override
22 | public void remoteDeviceDiscoveryFailed(Registry registry, RemoteDevice device, Exception ex) {
23 | // onDeviceRemoved(device);
24 | }
25 |
26 | @Override
27 | public void remoteDeviceAdded(Registry registry, RemoteDevice device) {
28 | onDeviceAdded(device);
29 | }
30 |
31 | @Override
32 | public void remoteDeviceRemoved(Registry registry, RemoteDevice device) {
33 | onDeviceRemoved(device);
34 | }
35 |
36 | @Override
37 | public void localDeviceAdded(Registry registry, LocalDevice device) {
38 | // onDeviceAdded(device);
39 | }
40 |
41 | @Override
42 | public void localDeviceRemoved(Registry registry, LocalDevice device) {
43 | // onDeviceRemoved(device);
44 | }
45 |
46 | /**
47 | * 新增 DLNA 设备
48 | */
49 | public void onDeviceAdded(Device device) {
50 | DeviceManager.getInstance().addDevice(device);
51 | }
52 |
53 | /**
54 | * 移除 DLNA 设备
55 | */
56 | public void onDeviceRemoved(Device device) {
57 | DeviceManager.getInstance().removeDevice(device);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/manager/DeviceManager.java:
--------------------------------------------------------------------------------
1 | package com.tool.clinglibrary2.manager;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.util.Log;
5 |
6 | import com.tool.clinglibrary2.entity.ClingDevice;
7 | import com.tool.clinglibrary2.event.CurrentDeviceEvent;
8 | import com.tool.clinglibrary2.event.DeviceEvent;
9 |
10 | import org.fourthline.cling.model.meta.Device;
11 | import org.fourthline.cling.model.types.DeviceType;
12 | import org.fourthline.cling.model.types.UDADeviceType;
13 | import org.greenrobot.eventbus.EventBus;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | /**
19 | * Created by lzan13 on 2018/3/9.
20 | * 设备管理器,保存当前包含设备列表,以及当前选中设备
21 | */
22 | public class DeviceManager {
23 | // DMR 设备 类型
24 | public static final DeviceType DMR_DEVICE = new UDADeviceType("MediaRenderer");
25 |
26 | private static DeviceManager instance;
27 | private List clingDeviceList;
28 | private ClingDevice currClingDevice;
29 |
30 | /**
31 | * 私有构造方法
32 | */
33 | private DeviceManager() {
34 | if (clingDeviceList == null) {
35 | clingDeviceList = new ArrayList<>();
36 | }
37 | clingDeviceList.clear();
38 | }
39 |
40 | /**
41 | * 唯一获取单例对象实例方法
42 | */
43 | public static DeviceManager getInstance() {
44 | if (instance == null) {
45 | instance = new DeviceManager();
46 | }
47 | return instance;
48 | }
49 |
50 | /**
51 | * 获取当前 Cling 设备
52 | */
53 | public ClingDevice getCurrClingDevice() {
54 | return currClingDevice;
55 | }
56 |
57 | /**
58 | * 设置当前 Cling 设备
59 | */
60 | public void setCurrClingDevice(ClingDevice currClingDevice) {
61 | this.currClingDevice = currClingDevice;
62 | //选中设备后,通知界面
63 | Log.d("------","->>>>> 设置当前 Cling 设备");
64 | // EventBus.getDefault().post(new CurrentDeviceEvent());
65 | }
66 |
67 | /**
68 | * 添加设备到设备列表
69 | */
70 | public void addDevice(@NonNull Device device) {
71 | if (device.getType().equals(DMR_DEVICE)) {
72 | ClingDevice clingDevice = new ClingDevice(device);
73 | clingDeviceList.add(clingDevice);
74 | EventBus.getDefault().post(new DeviceEvent());
75 | }
76 | }
77 |
78 | /**
79 | * 从设备列表移除设备
80 | */
81 | public void removeDevice(@NonNull Device device) {
82 | ClingDevice clingDevice = getClingDevice(device);
83 | if (clingDevice != null) {
84 | clingDeviceList.remove(clingDevice);
85 | }
86 | }
87 |
88 | /**
89 | * 获取设备
90 | */
91 | public ClingDevice getClingDevice(@NonNull Device device) {
92 | for (ClingDevice tmpDevice : clingDeviceList) {
93 | if (device.equals(tmpDevice.getDevice())) {
94 | return tmpDevice;
95 | }
96 | }
97 | return null;
98 | }
99 |
100 | /**
101 | * 获取设备列表
102 | */
103 | public List getClingDeviceList() {
104 | return clingDeviceList;
105 | }
106 |
107 | /**
108 | * 设置设备列表
109 | */
110 | public void setClingDeviceList(List list) {
111 | clingDeviceList = list;
112 | }
113 |
114 |
115 | /**
116 | * 销毁
117 | */
118 | public void destroy() {
119 | if (clingDeviceList != null) {
120 | clingDeviceList.clear();
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/service/upnp/AudioResourceServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kevin Shen
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.tool.clinglibrary2.service.upnp;
17 |
18 | import android.content.ContentUris;
19 | import android.database.Cursor;
20 | import android.net.Uri;
21 | import android.provider.MediaStore;
22 | import android.util.Log;
23 |
24 | import com.vmloft.develop.library.tools.VMTools;
25 | import com.vmloft.develop.library.tools.utils.VMFile;
26 |
27 | import org.eclipse.jetty.servlet.DefaultServlet;
28 | import org.eclipse.jetty.util.resource.FileResource;
29 | import org.eclipse.jetty.util.resource.Resource;
30 |
31 | import java.io.File;
32 |
33 | public class AudioResourceServlet extends DefaultServlet {
34 |
35 | @Override
36 | public Resource getResource(String pathInContext) {
37 | Resource resource = null;
38 |
39 | Log.i(AudioResourceServlet.class.getSimpleName(), "Path:" + pathInContext);
40 | try {
41 | String id = VMFile.parseResourceId(pathInContext);
42 | Log.i(AudioResourceServlet.class.getSimpleName(), "Id:" + id);
43 |
44 | Uri uri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, Long.parseLong(id));
45 | Cursor cursor = VMTools.getContext()
46 | .getContentResolver()
47 | .query(uri, null, null, null, null);
48 | cursor.moveToFirst();
49 | String path = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));
50 | File file = new File(path);
51 | if (file.exists()) {
52 | resource = FileResource.newResource(file);
53 | }
54 | } catch (Exception e) {
55 | e.printStackTrace();
56 | }
57 |
58 | return resource;
59 | }
60 |
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/service/upnp/ImageResourceServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kevin Shen
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.tool.clinglibrary2.service.upnp;
17 |
18 | import android.content.ContentUris;
19 | import android.database.Cursor;
20 | import android.net.Uri;
21 | import android.provider.MediaStore;
22 | import android.util.Log;
23 |
24 | import com.vmloft.develop.library.tools.VMTools;
25 | import com.vmloft.develop.library.tools.utils.VMFile;
26 |
27 | import org.eclipse.jetty.servlet.DefaultServlet;
28 | import org.eclipse.jetty.util.resource.FileResource;
29 | import org.eclipse.jetty.util.resource.Resource;
30 |
31 | import java.io.File;
32 |
33 | public class ImageResourceServlet extends DefaultServlet {
34 |
35 | @Override
36 | public Resource getResource(String pathInContext) {
37 | Resource resource = null;
38 |
39 | Log.i(ImageResourceServlet.class.getSimpleName(), "Path:" + pathInContext);
40 | try {
41 | String id = VMFile.parseResourceId(pathInContext);
42 | Log.i(ImageResourceServlet.class.getSimpleName(), "Id:" + id);
43 |
44 | Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, Long.parseLong(id));
45 | Cursor cursor = VMTools.getContext()
46 | .getContentResolver()
47 | .query(uri, null, null, null, null);
48 | cursor.moveToFirst();
49 | String path = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA));
50 | File file = new File(path);
51 | if (file.exists()) {
52 | resource = FileResource.newResource(file);
53 | }
54 | } catch (Exception e) {
55 | e.printStackTrace();
56 | }
57 |
58 | return resource;
59 | }
60 |
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/service/upnp/JettyResourceServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kevin Shen
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.tool.clinglibrary2.service.upnp;
17 |
18 | import com.tool.clinglibrary2.VConstants;
19 |
20 | import org.eclipse.jetty.server.Server;
21 | import org.eclipse.jetty.servlet.ServletContextHandler;
22 |
23 | import java.util.logging.Logger;
24 |
25 | public class JettyResourceServer implements Runnable {
26 | final private static Logger log = Logger.getLogger(JettyResourceServer.class.getName());
27 |
28 | private Server mServer;
29 |
30 | public JettyResourceServer() {
31 | mServer = new Server(VConstants.JETTY_SERVER_PORT); // Has its own QueuedThreadPool
32 | mServer.setGracefulShutdown(1000); // Let's wait a second for ongoing transfers to complete
33 | }
34 |
35 | synchronized public void startIfNotRunning() {
36 | if (!mServer.isStarted() && !mServer.isStarting()) {
37 | log.info("Starting JettyResourceServer");
38 | try {
39 | mServer.start();
40 | } catch (Exception ex) {
41 | log.severe("Couldn't start Jetty server: " + ex);
42 | throw new RuntimeException(ex);
43 | }
44 | }
45 | }
46 |
47 | synchronized public void stopIfRunning() {
48 | if (!mServer.isStopped() && !mServer.isStopping()) {
49 | log.info("Stopping JettyResourceServer");
50 | try {
51 | mServer.stop();
52 | } catch (Exception ex) {
53 | log.severe("Couldn't stop Jetty server: " + ex);
54 | throw new RuntimeException(ex);
55 | }
56 | }
57 | }
58 |
59 | public String getServerState() {
60 | return mServer.getState();
61 | }
62 |
63 | @Override
64 | public void run() {
65 | ServletContextHandler context = new ServletContextHandler();
66 | context.setContextPath("/");
67 | context.setInitParameter("org.eclipse.jetty.servlet.Default.gzip", "false");
68 | mServer.setHandler(context);
69 |
70 | context.addServlet(AudioResourceServlet.class, "/audio/*");
71 | context.addServlet(ImageResourceServlet.class, "/image/*");
72 | context.addServlet(VideoResourceServlet.class, "/video/*");
73 |
74 | startIfNotRunning();
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/android/src/main/java/com/tool/clinglibrary2/service/upnp/VideoResourceServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kevin Shen
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.tool.clinglibrary2.service.upnp;
17 |
18 | import android.content.ContentUris;
19 | import android.database.Cursor;
20 | import android.net.Uri;
21 | import android.provider.MediaStore;
22 | import android.util.Log;
23 |
24 | import com.vmloft.develop.library.tools.VMTools;
25 | import com.vmloft.develop.library.tools.utils.VMFile;
26 |
27 | import org.eclipse.jetty.servlet.DefaultServlet;
28 | import org.eclipse.jetty.util.resource.FileResource;
29 | import org.eclipse.jetty.util.resource.Resource;
30 |
31 | import java.io.File;
32 |
33 | public class VideoResourceServlet extends DefaultServlet {
34 |
35 | @Override
36 | public Resource getResource(String pathInContext) {
37 | Resource resource = null;
38 |
39 | Log.i(VideoResourceServlet.class.getSimpleName(), "Path:" + pathInContext);
40 | try {
41 | String id = VMFile.parseResourceId(pathInContext);
42 | Log.i(VideoResourceServlet.class.getSimpleName(), "Id:" + id);
43 |
44 | Uri uri = ContentUris.withAppendedId(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, Long.parseLong(id));
45 | Cursor cursor = VMTools.getContext()
46 | .getContentResolver()
47 | .query(uri, null, null, null, null);
48 | cursor.moveToFirst();
49 | String path = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA));
50 | File file = new File(path);
51 | if (file.exists()) {
52 | resource = FileResource.newResource(file);
53 | }
54 | } catch (Exception e) {
55 | e.printStackTrace();
56 | }
57 |
58 | return resource;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/.gitignore:
--------------------------------------------------------------------------------
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 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/.metadata:
--------------------------------------------------------------------------------
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: 20e59316b8b8474554b38493b8ca888794b0234a
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_plugin_example
2 |
3 | Demonstrates how to use the flutter_plugin 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.
17 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/build.gradle:
--------------------------------------------------------------------------------
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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.example.flutter_plugin_example"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | packagingOptions {
52 | exclude 'META-INF/beans.xml'
53 | }
54 | }
55 |
56 | flutter {
57 | source '../..'
58 | }
59 |
60 | dependencies {
61 | testImplementation 'junit:junit:4.12'
62 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
63 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
64 | }
65 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
11 |
15 |
22 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/java/com/example/flutter_plugin_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.flutter_plugin_example;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
3 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
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
7 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/android/settings.gradle:
--------------------------------------------------------------------------------
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 | }
16 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
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 | }
123 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
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 | }
24 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_plugin_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:flutter/services.dart';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_plugin/flutter_plugin.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 {
15 | List devices = [];
16 | List localImages = [];
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | print("---------1-----------${localImages.length}");
22 | init();
23 | }
24 |
25 | void init() async {
26 | FlutterPlugin.init((List data) {
27 | if (!mounted) {
28 | return;
29 | }
30 | setState(() {
31 | print("--------------------");
32 |
33 | });
34 | });
35 |
36 |
37 | }
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return GestureDetector(
42 | onTap: () async {
43 | FlutterPlugin.search();
44 | List d = await FlutterPlugin.localImages;
45 | setState(() {
46 | localImages = d;
47 | print("---------onTap-----------${d.length}");
48 | });
49 | },
50 | child: Container(
51 | color: Colors.blue,
52 | ),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_plugin_example
2 | description: Demonstrates how to use the flutter_plugin 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 | flutter_plugin:
21 | path: ../
22 |
23 | # For information on the generic Dart part of this file, see the
24 | # following page: https://dart.dev/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
64 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/example/test/widget_test.dart:
--------------------------------------------------------------------------------
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:flutter_plugin_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 | }
28 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/ios/.gitignore:
--------------------------------------------------------------------------------
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
37 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/masite/flutter-cling/141aa2c3932bc944ba7679a15888bb0cc2946d1b/plugins/flutter_plugin/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/plugins/flutter_plugin/ios/Classes/FlutterPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface FlutterPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/ios/Classes/FlutterPlugin.m:
--------------------------------------------------------------------------------
1 | #import "FlutterPlugin.h"
2 |
3 | @implementation FlutterPlugin
4 | + (void)registerWithRegistrar:(NSObject*)registrar {
5 | FlutterMethodChannel* channel = [FlutterMethodChannel
6 | methodChannelWithName:@"flutter_plugin"
7 | binaryMessenger:[registrar messenger]];
8 | FlutterPlugin* instance = [[FlutterPlugin alloc] init];
9 | [registrar addMethodCallDelegate:instance channel:channel];
10 | }
11 |
12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13 | if ([@"getPlatformVersion" isEqualToString:call.method]) {
14 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15 | } else {
16 | result(FlutterMethodNotImplemented);
17 | }
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/ios/flutter_plugin.podspec:
--------------------------------------------------------------------------------
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 = 'flutter_plugin'
6 | s.version = '0.0.1'
7 | s.summary = 'A new Flutter plugin.'
8 | s.description = <<-DESC
9 | A new Flutter plugin.
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 |
22 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/lib/flutter_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/services.dart';
4 |
5 | class FlutterPlugin {
6 | static const CHANNEL_NAME = "tech.shmy.plugins/flutter_dlan/";
7 | static const MethodChannel methodChannel =
8 | const MethodChannel(CHANNEL_NAME + "method_channel");
9 | static const EventChannel eventChannel =
10 | const EventChannel(CHANNEL_NAME + "event_channel");
11 | static StreamSubscription eventSubscription;
12 |
13 | static init(cb) {
14 | eventSubscription =
15 | eventChannel.receiveBroadcastStream().listen((dynamic data) {
16 | cb(data);
17 | });
18 | }
19 |
20 | static search() async {
21 | await methodChannel.invokeMethod('search');
22 | }
23 |
24 | static Future> get devices async {
25 | final List devices =
26 | await methodChannel.invokeListMethod("getList");
27 | return devices;
28 | }
29 |
30 | static connectDevice() async {
31 | var argument = {
32 | 'position': "0",
33 | };
34 | await methodChannel.invokeMethod('connectDevice', argument);
35 | }
36 |
37 | static playLocalSource(var argument) async {
38 | // var argument = {
39 | // 'title': "title",
40 | // };
41 | await methodChannel.invokeMethod("playLocal", argument);
42 | }
43 |
44 | static stopPlay() async {
45 | await methodChannel.invokeMethod("stopPlay");
46 | }
47 |
48 | static Future> get localImages async {
49 | final List getLocalImages =
50 | await methodChannel.invokeListMethod("getLocalImages");
51 | return getLocalImages;
52 | }
53 |
54 | static Future> get localVideos async {
55 | final List getLocalImages =
56 | await methodChannel.invokeListMethod("localVideos");
57 | return getLocalImages;
58 | }
59 |
60 | static Future> get localAudios async {
61 | final List getLocalImages =
62 | await methodChannel.invokeListMethod("localAudios");
63 | return getLocalImages;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_plugin
2 | description: A new Flutter plugin.
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://dart.dev/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.example.flutter_plugin
29 | pluginClass: FlutterPlugin
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
61 |
--------------------------------------------------------------------------------
/plugins/flutter_plugin/test/flutter_plugin_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:flutter_plugin/flutter_plugin.dart';
4 |
5 | void main() {
6 | const MethodChannel channel = MethodChannel('flutter_plugin');
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 FlutterPlugin.platformVersion, '42');
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_app
2 | description: A new Flutter application.
3 |
4 | version: 1.0.0+1
5 |
6 | environment:
7 | sdk: ">=2.1.0 <3.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 |
13 | flutter_dlan:
14 | path: plugins/flutter_dlan
15 |
16 | flutter_plugin:
17 | path: plugins/flutter_plugin
18 |
19 |
20 | #黏贴headerview
21 | sticky_headers: ^0.1.8
22 |
23 | # #权限
24 | simple_permissions: ^0.1.9
25 |
26 | path_provider: ^0.4.1
27 |
28 | cupertino_icons: ^0.1.2
29 |
30 | flutter_image_compress: ^0.6.3
31 |
32 | dev_dependencies:
33 | flutter_test:
34 | sdk: flutter
35 |
36 | flutter:
37 | uses-material-design: true
38 | assets:
39 | - assets/images/
40 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
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:flutter_app/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------