Browse Source

代码替换

linbing 5 năm trước cách đây
mục cha
commit
44ba5b6b53
100 tập tin đã thay đổi với 1349 bổ sung1158 xóa
  1. 2 2
      .metadata
  2. 27 69
      .packages
  3. 1 1
      CHANGELOG.md
  4. 1 201
      LICENSE
  5. 12 26
      README.md
  6. 7 6
      android/.gitignore
  7. 0 99
      android/app/src/main/kotlin/com/flutter/aliyunPush/AliyunPushPlugin.java
  8. 0 17
      android/app/src/main/kotlin/com/flutter/aliyunPush/MainActivity.java
  9. 0 20
      android/app/src/main/kotlin/com/flutter/aliyunPush/MyApplication.java
  10. 34 13
      android/build.gradle
  11. BIN
      android/gradle/wrapper/gradle-wrapper.jar
  12. 0 1
      android/gradle/wrapper/gradle-wrapper.properties
  13. 160 0
      android/gradlew
  14. 90 0
      android/gradlew.bat
  15. 1 15
      android/settings.gradle
  16. 20 0
      android/src/main/AndroidManifest.xml
  17. 117 0
      android/src/main/java/com/flutter/flutter_aliyun_push/FlutterAliyunPushPlugin.java
  18. 43 0
      example/.gitignore
  19. 10 0
      example/.metadata
  20. 16 0
      example/README.md
  21. 7 0
      example/android/.gitignore
  22. 49 0
      example/android/aliyun-emas-services.json
  23. 49 0
      example/android/app/aliyun-emas-services.json
  24. 13 10
      example/android/app/build.gradle
  25. 1 1
      example/android/app/src/debug/AndroidManifest.xml
  26. 5 3
      example/android/app/src/main/AndroidManifest.xml
  27. 21 0
      example/android/app/src/main/java/com/flutter/flutter_aliyun_push_example/AppApplication.java
  28. 6 0
      example/android/app/src/main/java/com/flutter/flutter_aliyun_push_example/MainActivity.java
  29. 0 0
      example/android/app/src/main/res/drawable/launch_background.xml
  30. 0 0
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  31. 0 0
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  32. 0 0
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  33. 0 0
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  34. 0 0
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  35. 0 0
      example/android/app/src/main/res/values/styles.xml
  36. 1 1
      example/android/app/src/profile/AndroidManifest.xml
  37. 47 0
      example/android/build.gradle
  38. 4 0
      example/android/gradle.properties
  39. 6 0
      example/android/gradle/wrapper/gradle-wrapper.properties
  40. 15 0
      example/android/settings.gradle
  41. 1 0
      example/android/settings_aar.gradle
  42. 32 0
      example/ios/.gitignore
  43. 0 0
      example/ios/Flutter/AppFrameworkInfo.plist
  44. 0 0
      example/ios/Flutter/Debug.xcconfig
  45. 0 0
      example/ios/Flutter/Release.xcconfig
  46. 14 21
      example/ios/Runner.xcodeproj/project.pbxproj
  47. 0 0
      example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  48. 0 0
      example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  49. 0 0
      example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  50. 0 0
      example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  51. 0 0
      example/ios/Runner.xcworkspace/contents.xcworkspacedata
  52. 0 0
      example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  53. 0 0
      example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  54. 6 0
      example/ios/Runner/AppDelegate.h
  55. 13 0
      example/ios/Runner/AppDelegate.m
  56. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  57. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  58. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  59. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  60. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  61. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  62. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  63. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  64. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  65. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  66. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  67. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  68. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  69. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  70. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  71. 0 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  72. 0 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  73. 0 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  74. 0 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  75. 0 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  76. 0 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  77. 0 0
      example/ios/Runner/Base.lproj/LaunchScreen.storyboard
  78. 0 0
      example/ios/Runner/Base.lproj/Main.storyboard
  79. 1 1
      example/ios/Runner/Info.plist
  80. 9 0
      example/ios/Runner/main.m
  81. 59 0
      example/lib/main.dart
  82. 196 0
      example/pubspec.lock
  83. 71 0
      example/pubspec.yaml
  84. 10 13
      example/test/widget_test.dart
  85. 0 24
      flutter_pager_list.iml
  86. 31 26
      ios/.gitignore
  87. 0 0
      ios/Assets/.gitkeep
  88. 4 0
      ios/Classes/FlutterAliyunPushPlugin.h
  89. 20 0
      ios/Classes/FlutterAliyunPushPlugin.m
  90. 0 13
      ios/Runner/AppDelegate.swift
  91. 0 1
      ios/Runner/Runner-Bridging-Header.h
  92. 23 0
      ios/flutter_aliyun_push.podspec
  93. 0 74
      lib/example.dart
  94. 0 58
      lib/example.g.dart
  95. 20 0
      lib/flutter_aliyun_push.dart
  96. 0 73
      lib/main.dart
  97. 0 8
      local.properties
  98. 24 317
      pubspec.lock
  99. 27 44
      pubspec.yaml
  100. 23 0
      test/flutter_aliyun_push_test.dart

+ 2 - 2
.metadata

@@ -4,7 +4,7 @@
 # This file should be version controlled and should not be manually edited.
 
 version:
-  revision: 5f21edf8b66e31a39133177319414395cc5b5f48
+  revision: 8af6b2f038c1172e61d418869363a28dffec3cb4
   channel: stable
 
-project_type: app
+project_type: plugin

+ 27 - 69
.packages

@@ -1,70 +1,28 @@
-# Generated by pub on 2020-07-16 17:42:34.468634.
-_fe_analyzer_shared:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/_fe_analyzer_shared-5.0.0/lib/
-analyzer:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.39.11/lib/
-archive:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.13/lib/
-args:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.6.0/lib/
-async:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.1/lib/
-boolean_selector:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.0.0/lib/
-build:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/build-1.3.0/lib/
-build_config:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/build_config-0.4.2/lib/
-build_daemon:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/build_daemon-2.1.4/lib/
-build_resolvers:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.9/lib/
-build_runner:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/build_runner-1.10.0/lib/
-build_runner_core:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/build_runner_core-5.2.0/lib/
-built_collection:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/built_collection-4.3.2/lib/
-built_value:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/built_value-7.1.0/lib/
-charcode:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.3/lib/
-checked_yaml:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/checked_yaml-1.0.2/lib/
-code_builder:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/code_builder-3.3.0/lib/
-collection:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.12/lib/
-convert:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/
-crypto:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.4/lib/
-csslib:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.16.1/lib/
-cupertino_icons:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.3/lib/
-dart_style:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/dart_style-1.3.6/lib/
-fixnum:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/fixnum-0.10.11/lib/
-flutter:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/packages/flutter/lib/
-flutter_test:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/packages/flutter_test/lib/
-glob:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.2.0/lib/
-graphs:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/graphs-0.2.0/lib/
-html:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.14.0+3/lib/
-http_multi_server:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.2.0/lib/
-http_parser:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4/lib/
-image:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.12/lib/
-io:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.4/lib/
-js:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.2/lib/
-json_annotation:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/json_annotation-3.0.1/lib/
-json_serializable:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/json_serializable-3.3.0/lib/
-logging:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.4/lib/
-matcher:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6/lib/
-meta:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.8/lib/
-mime:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+3/lib/
-node_interop:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_interop-1.1.1/lib/
-node_io:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_io-1.1.1/lib/
-package_config:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.9.3/lib/
-path:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4/lib/
-pedantic:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.0/lib/
-petitparser:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/petitparser-2.4.0/lib/
-pool:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.4.0/lib/
-pub_semver:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.4/lib/
-pubspec_parse:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/pubspec_parse-0.1.5/lib/
-quiver:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.1.3/lib/
-shelf:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.7/lib/
-shelf_web_socket:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.3/lib/
-sky_engine:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/bin/cache/pkg/sky_engine/lib/
-source_gen:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_gen-0.9.5/lib/
-source_span:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.7.0/lib/
-stack_trace:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
-stream_channel:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/
-stream_transform:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_transform-1.2.0/lib/
-string_scanner:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5/lib/
-term_glyph:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
-test_api:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.15/lib/
-timing:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/timing-0.1.1+2/lib/
-typed_data:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/
-vector_math:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib/
-watcher:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+15/lib/
-web_socket_channel:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.1.0/lib/
-xml:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/xml-3.6.1/lib/
-yaml:file:///E:/work/flutter/flutter_windows_1.17.2-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.2.1/lib/
+# Generated by pub on 2020-07-18 21:55:17.648143.
+archive:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/archive-2.0.13/lib/
+args:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/args-1.6.0/lib/
+async:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/async-2.4.1/lib/
+boolean_selector:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/boolean_selector-2.0.0/lib/
+charcode:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/charcode-1.1.3/lib/
+collection:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/collection-1.14.12/lib/
+convert:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/convert-2.1.1/lib/
+crypto:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/crypto-2.1.4/lib/
+flutter:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/packages/flutter/lib/
+flutter_test:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/packages/flutter_test/lib/
+image:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/image-2.1.12/lib/
+matcher:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/matcher-0.12.6/lib/
+meta:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/meta-1.1.8/lib/
+path:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/path-1.6.4/lib/
+petitparser:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/petitparser-2.4.0/lib/
+quiver:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/quiver-2.1.3/lib/
+sky_engine:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/bin/cache/pkg/sky_engine/lib/
+source_span:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/source_span-1.7.0/lib/
+stack_trace:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/stack_trace-1.9.3/lib/
+stream_channel:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/stream_channel-2.0.0/lib/
+string_scanner:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/string_scanner-1.0.5/lib/
+term_glyph:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/term_glyph-1.1.0/lib/
+test_api:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/test_api-0.2.15/lib/
+typed_data:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/typed_data-1.1.6/lib/
+vector_math:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/vector_math-2.0.8/lib/
+xml:file:///E:/flutter/soft/flutter_windows_1.17.5-stable/flutter/.pub-cache/hosted/mirrors.cloud.tencent.com%2547dart-pub/xml-3.6.1/lib/
 flutter_aliyun_push:lib/

+ 1 - 1
CHANGELOG.md

@@ -1,3 +1,3 @@
-## [0.0.1] - TODO: Add release date.
+## 0.0.1
 
 * TODO: Describe initial release.

+ 1 - 201
LICENSE

@@ -1,201 +1 @@
-Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
+TODO: Add your license here.

+ 12 - 26
README.md

@@ -1,28 +1,14 @@
-# flutter_simple_tabbar
-simple tabbar without TabController, just one widget
-<br/>
-json转对象文档:https://www.jianshu.com/p/da99262b17df
-支持监听页面切换,支持切换tab位置
-使用方法:<br/>
+# flutter_aliyun_push
+
+A new Flutter plugin.
 
-        ValueNotifier changeIndex = new ValueNotifier(2);
-        this.changeIndex.value = 0; //切换tab,直接设置ValueNotifier的值
-        
-        SimpleTabBar(
-         tabs: tabs,
-         changeIndex:changeIndex, //如果需要代码切换tab,可以使用这个属性
-         onTabChange:(index) {
-           print('onTabChange');
-           print(index);
-         },
-         tabContents: tabs
-              .map((Tab tab) =>
-              Container(child: Center(child: Text(tab.text),),))
-              .toList(),
-        ),
-      );
-        
-效果图如下:<br/>
-![image](https://img-blog.csdnimg.cn/20200702175908177.jpg)
-![image](https://img-blog.csdnimg.cn/20200702175908218.jpg)
 ## Getting Started
+
+This project is a starting point for a Flutter
+[plug-in package](https://flutter.dev/developing-packages/),
+a specialized package that includes platform-specific implementation code for
+Android and/or iOS.
+
+For help getting started with Flutter, view our 
+[online documentation](https://flutter.dev/docs), which offers tutorials, 
+samples, guidance on mobile development, and a full API reference.

+ 7 - 6
android/.gitignore

@@ -1,7 +1,8 @@
-gradle-wrapper.jar
-/.gradle
-/captures/
-/gradlew
-/gradlew.bat
+*.iml
+.gradle
 /local.properties
-GeneratedPluginRegistrant.java
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures

+ 0 - 99
android/app/src/main/kotlin/com/flutter/aliyunPush/AliyunPushPlugin.java

@@ -1,99 +0,0 @@
-package com.flutter.aliyunPush;
-
-import android.content.Context;
-
-import androidx.annotation.NonNull;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-
-import io.flutter.Log;
-import io.flutter.embedding.engine.plugins.FlutterPlugin;
-import io.flutter.plugin.common.BinaryMessenger;
-import io.flutter.plugin.common.JSONMethodCodec;
-import io.flutter.plugin.common.MethodCall;
-import io.flutter.plugin.common.MethodChannel;
-import io.flutter.plugin.common.PluginRegistry;
-
-public class AliyunPushPlugin implements FlutterPlugin, MethodChannel.MethodCallHandler {
-
-    private static AliyunPushPlugin instance;
-    private final String TAG = "AliyunPushPlugin";
-    private Context context;
-    private Object initializationLock = new Object();
-    private MethodChannel aliyunPushPluginChannel;
-
-    public AliyunPushPlugin() {}
-
-    public static void registerWith(PluginRegistry.Registrar registrar) {
-        if (instance == null) {
-            instance = new AliyunPushPlugin();
-        }
-        instance.onAttachedToEngine(registrar.context(), registrar.messenger());
-    }
-
-    @Override
-    public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
-        onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
-    }
-
-    @Override
-    public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
-        Log.i(TAG, "onDetachedFromEngine");
-        context = null;
-        aliyunPushPluginChannel.setMethodCallHandler(null);
-        aliyunPushPluginChannel = null;
-    }
-
-
-    public void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
-        synchronized (initializationLock) {
-            if (aliyunPushPluginChannel != null) {
-                return;
-            }
-
-            Log.i(TAG, "onAttachedToEngine");
-            this.context = applicationContext;
-
-            // alarmManagerPluginChannel is the channel responsible for receiving the following messages
-            // from the main Flutter app:
-            // - "AlarmService.start"
-            // - "Alarm.oneShotAt"
-            // - "Alarm.periodic"
-            // - "Alarm.cancel"
-            aliyunPushPluginChannel =
-                    new MethodChannel(
-                            messenger, "com.flutter.plugins.aliyun_push", JSONMethodCodec.INSTANCE);
-
-            // Instantiate a new Plugin and connect the primary method channel for
-            // Android/Flutter communication.
-            aliyunPushPluginChannel.setMethodCallHandler(this);
-            aliyunPushPluginChannel.invokeMethod("onPushInit",null);
-
-        }
-    }
-
-    @Override
-    public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
-        String method = call.method;
-        Object arguments = call.arguments;
-        try {
-            if (method.equals("AlarmService.start")) {
-                // This message is sent when the Dart side of this plugin is told to initialize.
-                long callbackHandle = ((JSONArray) arguments).getLong(0);
-                // In response, this (native) side of the plugin needs to spin up a background
-                // Dart isolate by using the given callbackHandle, and then setup a background
-                // method channel to communicate with the new background isolate. Once completed,
-                // this onMethodCall() method will receive messages from both the primary and background
-                // method channels.
-                result.success(true);
-            }else {
-                result.notImplemented();
-            }
-        } catch (JSONException e) {
-            result.error("error", "JSON error: " + e.getMessage(), null);
-        } catch (Exception e) {
-            result.error("error", "AlarmManager error: " + e.getMessage(), null);
-        }
-    }
-}

+ 0 - 17
android/app/src/main/kotlin/com/flutter/aliyunPush/MainActivity.java

@@ -1,17 +0,0 @@
-package com.flutter.aliyunPush;
-
-import android.os.Bundle;
-
-import androidx.annotation.Nullable;
-
-import io.flutter.app.FlutterActivity;
-
-
-public class MainActivity extends FlutterActivity {
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-    }
-}

+ 0 - 20
android/app/src/main/kotlin/com/flutter/aliyunPush/MyApplication.java

@@ -1,20 +0,0 @@
-package com.flutter.aliyunPush;
-
-import io.flutter.app.FlutterApplication;
-import io.flutter.embedding.engine.FlutterEngine;
-import io.flutter.plugin.common.PluginRegistry;
-import io.flutter.plugins.GeneratedPluginRegistrant;
-
-public class MyApplication extends FlutterApplication implements PluginRegistry.PluginRegistrantCallback {
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-    }
-
-    @Override
-    public void registerWith(PluginRegistry registry) {
-        AliyunPushPlugin.registerWith(
-                registry.registrarFor("com.flutter.aliyunPush.AliyunPushPlugin"));
-    }
-}

+ 34 - 13
android/build.gradle

@@ -1,11 +1,16 @@
+group 'com.flutter.flutter_aliyun_push'
+version '1.0'
+
 buildscript {
-    ext.kotlin_version = '1.3.50'
     repositories {
-//        google()
+        //        google()
 //        jcenter()
         maven {
             url 'http://download.flutter.io'
         }
+        maven {
+            url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
+        }
         maven { url 'https://maven.aliyun.com/repository/google' }
         maven { url 'https://maven.aliyun.com/repository/jcenter' }
         maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
@@ -13,31 +18,47 @@ buildscript {
 
     dependencies {
         classpath 'com.android.tools.build:gradle:3.5.0'
-        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
     }
 }
 
-allprojects {
+rootProject.allprojects {
     repositories {
-//        google()
+        //        google()
 //        jcenter()
         maven {
             url 'http://download.flutter.io'
         }
+        maven {
+            url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
+        }
         maven { url 'https://maven.aliyun.com/repository/google' }
         maven { url 'https://maven.aliyun.com/repository/jcenter' }
         maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
     }
 }
 
-rootProject.buildDir = '../build'
-subprojects {
-    project.buildDir = "${rootProject.buildDir}/${project.name}"
-}
-subprojects {
-    project.evaluationDependsOn(':app')
+apply plugin: 'com.android.library'
+
+android {
+    compileSdkVersion 28
+
+    defaultConfig {
+        minSdkVersion 16
+
+
+    }
+    lintOptions {
+        disable 'InvalidPackage'
+    }
+
+
 }
 
-task clean(type: Delete) {
-    delete rootProject.buildDir
+dependencies {
+    implementation 'com.aliyun.ams:alicloud-android-push:3.1.9.1@aar'
+//    implementation 'com.aliyun.ams:alicloud-android-third-push:3.+@aar'
+    implementation 'com.aliyun.ams:alicloud-android-utdid:1.5.2'
+    implementation 'com.aliyun.ams:alicloud-android-utils:1.1.6.4'
+    implementation 'com.aliyun.ams:alicloud-android-ut:5.4.3'
+    implementation 'com.aliyun.ams:alicloud-android-beacon:1.0.4.3'
 }

BIN
android/gradle/wrapper/gradle-wrapper.jar


+ 0 - 1
android/gradle/wrapper/gradle-wrapper.properties

@@ -1,4 +1,3 @@
-#Fri Jun 23 08:50:38 CEST 2017
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME

+ 160 - 0
android/gradlew

@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90 - 0
android/gradlew.bat

@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 1 - 15
android/settings.gradle

@@ -1,15 +1 @@
-// Copyright 2014 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-include ':app'
-
-def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
-def properties = new Properties()
-
-assert localPropertiesFile.exists()
-localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
-
-def flutterSdkPath = properties.getProperty("flutter.sdk")
-assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
-apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
+rootProject.name = 'flutter_aliyun_push'

+ 20 - 0
android/src/main/AndroidManifest.xml

@@ -0,0 +1,20 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+  package="com.flutter.flutter_aliyun_push">
+    <!-- 阿里云推送相关权限 -->
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" /><!-- 手机识别码权限,用于生成设备唯一id -->
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /><!-- 接收推送主要权限 -->
+    <uses-permission android:name="android.permission.GET_TASKS" /><!-- 获取近期运行任务,用于应用是否活跃的判断 -->
+    <uses-permission android:name="android.permission.REORDER_TASKS" /><!-- 获取近期运行任务,用于应用是否活跃的判断 -->
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <application
+        android:usesCleartextTraffic="true"
+        >
+        <meta-data android:name="com.alibaba.app.appkey" android:value="${aliyunPushAppKey}"/> <!-- 请填写你自己的- appKey -->
+        <meta-data android:name="com.alibaba.app.appsecret" android:value="${aliyunPushAppSecret}"/> <!-- 请填写你自己的appSecret -->
+    </application>
+</manifest>

+ 117 - 0
android/src/main/java/com/flutter/flutter_aliyun_push/FlutterAliyunPushPlugin.java

@@ -0,0 +1,117 @@
+package com.flutter.flutter_aliyun_push;
+
+import android.content.Context;
+
+import androidx.annotation.NonNull;
+
+import com.alibaba.sdk.android.push.CloudPushService;
+import com.alibaba.sdk.android.push.CommonCallback;
+import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import io.flutter.Log;
+import io.flutter.embedding.engine.plugins.FlutterPlugin;
+import io.flutter.plugin.common.BinaryMessenger;
+import io.flutter.plugin.common.JSONMethodCodec;
+import io.flutter.plugin.common.MethodCall;
+import io.flutter.plugin.common.MethodChannel;
+import io.flutter.plugin.common.PluginRegistry;
+import io.flutter.plugin.common.StandardMessageCodec;
+import io.flutter.plugin.common.StandardMethodCodec;
+
+public class FlutterAliyunPushPlugin implements FlutterPlugin, MethodChannel.MethodCallHandler {
+
+  private static FlutterAliyunPushPlugin instance;
+  public static final String TAG = "AliyunPushPlugin";
+  public static final String CHANNEL_NAME="aliyun_push";
+  private Context context;
+  private Object initializationLock = new Object();
+  private MethodChannel aliyunPushPluginChannel;
+
+  public FlutterAliyunPushPlugin() {}
+
+  public static void registerWith(PluginRegistry.Registrar registrar) {
+    if (instance == null) {
+      instance = new FlutterAliyunPushPlugin();
+    }
+    instance.onAttachedToEngine(registrar.context(), registrar.messenger());
+  }
+
+  public static void initPush(Context context) {
+    Log.i(TAG, "start initPush");
+    PushServiceFactory.init(context);
+    CloudPushService pushService = PushServiceFactory.getCloudPushService();
+    pushService.register(context, new CommonCallback() {
+      @Override
+      public void onSuccess(String response) {
+        Log.d(FlutterAliyunPushPlugin.TAG, "init cloudchannel success");
+      }
+      @Override
+      public void onFailed(String errorCode, String errorMessage) {
+        Log.d(FlutterAliyunPushPlugin.TAG, "init cloudchannel failed -- errorcode:" + errorCode + " -- errorMessage:" + errorMessage);
+      }
+    });
+
+  }
+
+
+  @Override
+  public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
+    onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
+  }
+
+  @Override
+  public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
+    Log.i(TAG, "onDetachedFromEngine");
+    context = null;
+    aliyunPushPluginChannel.setMethodCallHandler(null);
+    aliyunPushPluginChannel = null;
+  }
+
+
+  public void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
+    synchronized (initializationLock) {
+      if (aliyunPushPluginChannel != null) {
+        return;
+      }
+
+      Log.i(TAG, "onAttachedToEngine");
+      this.context = applicationContext;
+
+      aliyunPushPluginChannel =
+              new MethodChannel(
+                      messenger, CHANNEL_NAME, StandardMethodCodec.INSTANCE);
+
+      // Instantiate a new Plugin and connect the primary method channel for
+      // Android/Flutter communication.
+      aliyunPushPluginChannel.setMethodCallHandler(this);
+//      aliyunPushPluginChannel.invokeMethod("onPushInit",null);
+
+    }
+  }
+
+  @Override
+  public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
+    Log.i(TAG, "onMethodCall:"+call.method);
+    String method = call.method;
+    Object arguments = call.arguments;
+    try {
+      if (method.equals("getPlatformVersion")) {
+        // This message is sent when the Dart side of this plugin is told to initialize.
+        result.success("Android " + android.os.Build.VERSION.RELEASE);
+      }else if(method.equals("initPush")) {
+//        initPush(this.context);
+
+      }
+      else {
+        result.notImplemented();
+      }
+    } catch (Exception e) {
+      result.error("error", "AlarmManager error: " + e.getMessage(), null);
+    }
+  }
+
+
+}

+ 43 - 0
example/.gitignore

@@ -0,0 +1,43 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Exceptions to above rules.
+!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

+ 10 - 0
example/.metadata

@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: 8af6b2f038c1172e61d418869363a28dffec3cb4
+  channel: stable
+
+project_type: app

+ 16 - 0
example/README.md

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

+ 7 - 0
example/android/.gitignore

@@ -0,0 +1,7 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java

+ 49 - 0
example/android/aliyun-emas-services.json

@@ -0,0 +1,49 @@
+{
+  "config": {
+	"emas.appKey":"30543515",
+	"emas.appSecret":"ee0268fd22fcfd66fb416163b235dd29",
+	"emas.packageName":"com.flutter.aliyunPush",
+	"hotfix.idSecret":"30543515-1",
+	"hotfix.rsaSecret":"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC/HEMBeUWrkSdpnq0U94MjsEFqOMj5y7N7Do8zJWbcBNdpBDE334DOxD/FQm/gn6N+y4zycn4Unm4mV85BJPTSIQ34vzVSf2XZLvT495II7JPHYyjjs2ZVDZYIwaFl5D01KIzq9urRmFqvyW2lW8HKcvBfbmxY5S0dkrlZgVdSURPE1bPm6ld9fP9TMZxgJ9acfQcaQUMOGy9QMXQhsXCxzz3LoOi6vr6iz44wmS0RBB6InkhDHvgA3muyxxL0WZ7L5VsjHd+m4z/W33gtQArF3pnNPfXyh029dDJBTys3X7uMRxmLwxND6hml1cWucDHrFKF0KlDoKyyFPi+JE397AgMBAAECggEAAkEOFUVd6gEjSt6hQf8NX+1jSCJ1VGTvsALi84J8bRnthIKVJgiP12B/NA9tjGO1pPg3qGBrVkjsGa2tdB1Aef4D0SxIL7nq9J3WK92Xrl1D/PURdWYXTeeEHoRSKAaCJk9dIiRZbrFyWGJy1aF4bq/eX/HIe1/woUmqwACDjCf9bia6+YxMeWwevV6bZMTFqUV3LgTWQEUn20ew6SrTrTgA+XUjk4YCDiOegI+P8gZWp9sp9ptpckGYxw6sU8Nla9zPX5kZyCMaDI4FcrBmBZjWwh+iC3EtcNaarBq/S1FReQ2x8xxUvhJQX+bGDmh+Bf/sgumMIb4AYbM6MrGQ2QKBgQDr7kIQKHFv2YdEEaNFc0PAIlwG6e0FF2eEEm0yrfyqdpAYgUbrw0htEo7Frk8wEQPrG6H6dxKAaNKXFnFRVV6hIf9GET36Fc2kRQkvVz4bXISB6SIhXjaZPssLSMSwIWa+3yIY/bV2rxTd179Z10Poqs06/QQrYkYKgxAxmB8jhQKBgQDPXfmZt21OZdU48PcR6oSQ/40lc41yQRT+OPLjcc5ToQYeg5uMzzI8UcS150bXDSdiuDj4GRa3SjSN2nJxABtilkhdIZ00TuM1BLt1T0TtwdKGL3zPQXKGH+3eNVavY+13FrwEl+VBtJt2BVhW6ofhGTeqaThYwnTSn/MTfnIG/wKBgFg6VUItnZ4yPr9ZyTDjleZ38uoy+Iv64J8nNObK4b3tcJ15Wsg30xHW6sVKFhrnggud3ckIVkbm7DnMDrxXrHedexT8xayMEsbnejPV8EfTJUpfoH/R96D/NncV01f6Za3jS6EE36NufeMoF0rFkYOku/LfQ3vl2EN+F8Q0GxDxAoGBAMv9sEqtDNQwjP6E3Sg8wcg5/Mm40I5yw4oKz7U7ATN3liNyaBSuxsZb0dz39NIc2H/epfw6AgSw9N4O5MGQz1++YtVq+dC5Qf2n+BjAsBgLsWPbVzYzNcwHoOIVKn9DGBksvizul9J5Lu18+JgYAy9GtWHoPEvkjzObsW2d1+JVAoGBALSK0/CUwhYWThG4zsgC+Z0DJkECq484N9awQ2TRPycT5Pbs8/yD6zgLiJdqMJtLDgD6gnBEsN9PQIZ+UxcfTGNqMuRECApMSzJg4HmPqpFGfVNHA1AbbzhoCkXAp01Ao9WN/T15VZp973Xvr0sJ8oaYA/2vnM0kO2WYiyxTrcqE",
+	"httpdns.accountId":"137350",
+	"httpdns.secretKey":"12d1510955b12671ad5787640ffa5a63",
+	"appmonitor.tlog.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD5IlORQKELpOpwbU27hze2sSuk8q6RuPldsyYjQxWNCHaeEn/oLbE/+O3+ph83AzGOjvy5LxcwxeA2iY/MFI6TgqrSOJucIbUxLVub37TnSimhAP9hQOIi3FpbZbi8z7p+9a6bjny1WJbS/eOB+jLt6MFApIkVDoHM6lx8xNRVewIDAQAB",
+	"appmonitor.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD5IlORQKELpOpwbU27hze2sSuk8q6RuPldsyYjQxWNCHaeEn/oLbE/+O3+ph83AzGOjvy5LxcwxeA2iY/MFI6TgqrSOJucIbUxLVub37TnSimhAP9hQOIi3FpbZbi8z7p+9a6bjny1WJbS/eOB+jLt6MFApIkVDoHM6lx8xNRVewIDAQAB"
+},
+  "services": {
+	"hotfix_service":{
+		"status":1,
+		"version":"3.2.14"
+	},
+	"ha-adapter_service":{
+		"status":1,
+		"version":"1.1.3.4-open"
+	},
+	"feedback_service":{
+		"status":1,
+		"version":"3.3.1"
+	},
+	"tlog_service":{
+		"status":1,
+		"version":"1.1.2.3-open"
+	},
+	"httpdns_service":{
+		"status":1,
+		"version":"1.3.2.3"
+	},
+	"apm_service":{
+		"status":1,
+		"version":"1.0.7.9-open"
+	},
+	"man_service":{
+		"status":1,
+		"version":"1.2.4"
+	},
+	"cps_service":{
+		"status":1,
+		"version":"3.1.9.1"
+	}
+},
+  "use_maven":true,
+  "proguard_keeplist":"\n#httpdns\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#cps\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n-keepclasseswithmembernames class ** {\nnative <methods>;\n}\n-keepattributes Signature\n-keep class sun.misc.Unsafe { *; }\n-keep class com.alipay.** {*;}\n-dontwarn com.alipay.**\n-keep class anet.**{*;}\n-keep class org.android.spdy.**{*;}\n-keep class org.android.agoo.**{*;}\n-dontwarn anet.**\n-dontwarn org.android.spdy.**\n-dontwarn org.android.agoo.**\n\n#hotfix\n#基线包使用,生成mapping.txt\n-printmapping mapping.txt\n#生成的mapping.txt在app/buidl/outputs/mapping/release路径下,移动到/app路径下\n#修复后的项目使用,保证混淆结果一致\n#-applymapping mapping.txt\n#hotfix\n-keep class com.taobao.sophix.**{*;}\n-keep class com.ta.utdid2.device.**{*;}\n#防止inline\n-dontoptimize\n\n#man\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#feedback\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n"
+}

+ 49 - 0
example/android/app/aliyun-emas-services.json

@@ -0,0 +1,49 @@
+{
+  "config": {
+	"emas.appKey":"30543515",
+	"emas.appSecret":"ee0268fd22fcfd66fb416163b235dd29",
+	"emas.packageName":"com.flutter.aliyunPush",
+	"hotfix.idSecret":"30543515-1",
+	"hotfix.rsaSecret":"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC/HEMBeUWrkSdpnq0U94MjsEFqOMj5y7N7Do8zJWbcBNdpBDE334DOxD/FQm/gn6N+y4zycn4Unm4mV85BJPTSIQ34vzVSf2XZLvT495II7JPHYyjjs2ZVDZYIwaFl5D01KIzq9urRmFqvyW2lW8HKcvBfbmxY5S0dkrlZgVdSURPE1bPm6ld9fP9TMZxgJ9acfQcaQUMOGy9QMXQhsXCxzz3LoOi6vr6iz44wmS0RBB6InkhDHvgA3muyxxL0WZ7L5VsjHd+m4z/W33gtQArF3pnNPfXyh029dDJBTys3X7uMRxmLwxND6hml1cWucDHrFKF0KlDoKyyFPi+JE397AgMBAAECggEAAkEOFUVd6gEjSt6hQf8NX+1jSCJ1VGTvsALi84J8bRnthIKVJgiP12B/NA9tjGO1pPg3qGBrVkjsGa2tdB1Aef4D0SxIL7nq9J3WK92Xrl1D/PURdWYXTeeEHoRSKAaCJk9dIiRZbrFyWGJy1aF4bq/eX/HIe1/woUmqwACDjCf9bia6+YxMeWwevV6bZMTFqUV3LgTWQEUn20ew6SrTrTgA+XUjk4YCDiOegI+P8gZWp9sp9ptpckGYxw6sU8Nla9zPX5kZyCMaDI4FcrBmBZjWwh+iC3EtcNaarBq/S1FReQ2x8xxUvhJQX+bGDmh+Bf/sgumMIb4AYbM6MrGQ2QKBgQDr7kIQKHFv2YdEEaNFc0PAIlwG6e0FF2eEEm0yrfyqdpAYgUbrw0htEo7Frk8wEQPrG6H6dxKAaNKXFnFRVV6hIf9GET36Fc2kRQkvVz4bXISB6SIhXjaZPssLSMSwIWa+3yIY/bV2rxTd179Z10Poqs06/QQrYkYKgxAxmB8jhQKBgQDPXfmZt21OZdU48PcR6oSQ/40lc41yQRT+OPLjcc5ToQYeg5uMzzI8UcS150bXDSdiuDj4GRa3SjSN2nJxABtilkhdIZ00TuM1BLt1T0TtwdKGL3zPQXKGH+3eNVavY+13FrwEl+VBtJt2BVhW6ofhGTeqaThYwnTSn/MTfnIG/wKBgFg6VUItnZ4yPr9ZyTDjleZ38uoy+Iv64J8nNObK4b3tcJ15Wsg30xHW6sVKFhrnggud3ckIVkbm7DnMDrxXrHedexT8xayMEsbnejPV8EfTJUpfoH/R96D/NncV01f6Za3jS6EE36NufeMoF0rFkYOku/LfQ3vl2EN+F8Q0GxDxAoGBAMv9sEqtDNQwjP6E3Sg8wcg5/Mm40I5yw4oKz7U7ATN3liNyaBSuxsZb0dz39NIc2H/epfw6AgSw9N4O5MGQz1++YtVq+dC5Qf2n+BjAsBgLsWPbVzYzNcwHoOIVKn9DGBksvizul9J5Lu18+JgYAy9GtWHoPEvkjzObsW2d1+JVAoGBALSK0/CUwhYWThG4zsgC+Z0DJkECq484N9awQ2TRPycT5Pbs8/yD6zgLiJdqMJtLDgD6gnBEsN9PQIZ+UxcfTGNqMuRECApMSzJg4HmPqpFGfVNHA1AbbzhoCkXAp01Ao9WN/T15VZp973Xvr0sJ8oaYA/2vnM0kO2WYiyxTrcqE",
+	"httpdns.accountId":"137350",
+	"httpdns.secretKey":"12d1510955b12671ad5787640ffa5a63",
+	"appmonitor.tlog.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD5IlORQKELpOpwbU27hze2sSuk8q6RuPldsyYjQxWNCHaeEn/oLbE/+O3+ph83AzGOjvy5LxcwxeA2iY/MFI6TgqrSOJucIbUxLVub37TnSimhAP9hQOIi3FpbZbi8z7p+9a6bjny1WJbS/eOB+jLt6MFApIkVDoHM6lx8xNRVewIDAQAB",
+	"appmonitor.rsaSecret":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD5IlORQKELpOpwbU27hze2sSuk8q6RuPldsyYjQxWNCHaeEn/oLbE/+O3+ph83AzGOjvy5LxcwxeA2iY/MFI6TgqrSOJucIbUxLVub37TnSimhAP9hQOIi3FpbZbi8z7p+9a6bjny1WJbS/eOB+jLt6MFApIkVDoHM6lx8xNRVewIDAQAB"
+},
+  "services": {
+	"hotfix_service":{
+		"status":1,
+		"version":"3.2.14"
+	},
+	"ha-adapter_service":{
+		"status":1,
+		"version":"1.1.3.4-open"
+	},
+	"feedback_service":{
+		"status":1,
+		"version":"3.3.1"
+	},
+	"tlog_service":{
+		"status":1,
+		"version":"1.1.2.3-open"
+	},
+	"httpdns_service":{
+		"status":1,
+		"version":"1.3.2.3"
+	},
+	"apm_service":{
+		"status":1,
+		"version":"1.0.7.9-open"
+	},
+	"man_service":{
+		"status":1,
+		"version":"1.2.4"
+	},
+	"cps_service":{
+		"status":1,
+		"version":"3.1.9.1"
+	}
+},
+  "use_maven":true,
+  "proguard_keeplist":"\n#httpdns\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#cps\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n-keepclasseswithmembernames class ** {\nnative <methods>;\n}\n-keepattributes Signature\n-keep class sun.misc.Unsafe { *; }\n-keep class com.alipay.** {*;}\n-dontwarn com.alipay.**\n-keep class anet.**{*;}\n-keep class org.android.spdy.**{*;}\n-keep class org.android.agoo.**{*;}\n-dontwarn anet.**\n-dontwarn org.android.spdy.**\n-dontwarn org.android.agoo.**\n\n#hotfix\n#基线包使用,生成mapping.txt\n-printmapping mapping.txt\n#生成的mapping.txt在app/buidl/outputs/mapping/release路径下,移动到/app路径下\n#修复后的项目使用,保证混淆结果一致\n#-applymapping mapping.txt\n#hotfix\n-keep class com.taobao.sophix.**{*;}\n-keep class com.ta.utdid2.device.**{*;}\n#防止inline\n-dontoptimize\n\n#man\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n\n#feedback\n-keep class com.taobao.** {*;}\n-keep class com.alibaba.** {*;}\n-keep class com.ta.**{*;}\n-keep class com.ut.**{*;}\n-dontwarn com.taobao.**\n-dontwarn com.alibaba.**\n-dontwarn com.ta.**\n-dontwarn com.ut.**\n"
+}

+ 13 - 10
android/app/build.gradle → example/android/app/build.gradle

@@ -22,27 +22,30 @@ if (flutterVersionName == null) {
 }
 
 apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
     compileSdkVersion 28
 
-    sourceSets {
-        main.java.srcDirs += 'src/main/kotlin'
-    }
-
     lintOptions {
         disable 'InvalidPackage'
     }
 
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
-        applicationId "com.flutter.flutter_pager_list"
+        applicationId "com.flutter.aliyunPush"
         minSdkVersion 16
         targetSdkVersion 28
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName
+
+
+        manifestPlaceholders = [
+                aliyunPushAppKey: "30543515",
+                aliyunPushAppSecret:"ee0268fd22fcfd66fb416163b235dd29"
+        ]
+
+
     }
 
     buildTypes {
@@ -54,10 +57,10 @@ android {
     }
 }
 
-flutter {
-    source '../..'
+dependencies {
+
 }
 
-dependencies {
-    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+flutter {
+    source '../..'
 }

+ 1 - 1
android/app/src/profile/AndroidManifest.xml → example/android/app/src/debug/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.flutter.flutter_pager_list">
+    package="com.flutter.flutter_aliyun_push_example">
     <!-- Flutter needs it to communicate with the running application
          to allow setting breakpoints, to provide hot reload, etc.
     -->

+ 5 - 3
android/app/src/main/AndroidManifest.xml → example/android/app/src/main/AndroidManifest.xml

@@ -1,13 +1,15 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.flutter.flutter_pager_list">
+    xmlns:tools="http://schemas.android.com/tools"
+    package="com.flutter.flutter_aliyun_push_example">
     <!-- io.flutter.app.FlutterApplication is an android.app.Application that
          calls FlutterMain.startInitialization(this); in its onCreate method.
          In most cases you can leave this as-is, but you if you want to provide
          additional functionality it is fine to subclass or reimplement
          FlutterApplication and put your custom class here. -->
     <application
-        android:name="io.flutter.app.FlutterApplication"
-        android:label="flutter_pager_list"
+        android:name=".AppApplication"
+        android:label="flutter_aliyun_push_example"
+        tools:replace="android:label"
         android:icon="@mipmap/ic_launcher">
         <activity
             android:name=".MainActivity"

+ 21 - 0
example/android/app/src/main/java/com/flutter/flutter_aliyun_push_example/AppApplication.java

@@ -0,0 +1,21 @@
+package com.flutter.flutter_aliyun_push_example;
+
+
+import com.flutter.flutter_aliyun_push.FlutterAliyunPushPlugin;
+
+import io.flutter.Log;
+import io.flutter.app.FlutterApplication;
+
+public class AppApplication extends FlutterApplication  {
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        Log.d("MyApplication","onCreate");
+
+        FlutterAliyunPushPlugin.initPush(this);
+    }
+
+
+
+}

+ 6 - 0
example/android/app/src/main/java/com/flutter/flutter_aliyun_push_example/MainActivity.java

@@ -0,0 +1,6 @@
+package com.flutter.flutter_aliyun_push_example;
+
+import io.flutter.embedding.android.FlutterActivity;
+
+public class MainActivity extends FlutterActivity {
+}

+ 0 - 0
android/app/src/main/res/drawable/launch_background.xml → example/android/app/src/main/res/drawable/launch_background.xml


+ 0 - 0
android/app/src/main/res/mipmap-hdpi/ic_launcher.png → example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png


+ 0 - 0
android/app/src/main/res/mipmap-mdpi/ic_launcher.png → example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png


+ 0 - 0
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png → example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


+ 0 - 0
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png → example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


+ 0 - 0
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png → example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 0 - 0
android/app/src/main/res/values/styles.xml → example/android/app/src/main/res/values/styles.xml


+ 1 - 1
android/app/src/debug/AndroidManifest.xml → example/android/app/src/profile/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.flutter.flutter_pager_list">
+    package="com.flutter.flutter_aliyun_push_example">
     <!-- Flutter needs it to communicate with the running application
          to allow setting breakpoints, to provide hot reload, etc.
     -->

+ 47 - 0
example/android/build.gradle

@@ -0,0 +1,47 @@
+buildscript {
+    repositories {
+        //        google()
+//        jcenter()
+        maven {
+            url 'http://download.flutter.io'
+        }
+        maven {
+            url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
+        }
+        maven { url 'https://maven.aliyun.com/repository/google' }
+        maven { url 'https://maven.aliyun.com/repository/jcenter' }
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.5.0'
+    }
+}
+
+allprojects {
+    repositories {
+        //        google()
+//        jcenter()
+        maven {
+            url 'http://download.flutter.io'
+        }
+        maven {
+            url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
+        }
+        maven { url 'https://maven.aliyun.com/repository/google' }
+        maven { url 'https://maven.aliyun.com/repository/jcenter' }
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
+    }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+    project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+    project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 4 - 0
example/android/gradle.properties

@@ -0,0 +1,4 @@
+org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true
+android.useAndroidX=true
+android.enableJetifier=true

+ 6 - 0
example/android/gradle/wrapper/gradle-wrapper.properties

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

+ 15 - 0
example/android/settings.gradle

@@ -0,0 +1,15 @@
+// Copyright 2014 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

+ 1 - 0
example/android/settings_aar.gradle

@@ -0,0 +1 @@
+include ':app'

+ 32 - 0
example/ios/.gitignore

@@ -0,0 +1,32 @@
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 0 - 0
ios/Flutter/AppFrameworkInfo.plist → example/ios/Flutter/AppFrameworkInfo.plist


+ 0 - 0
ios/Flutter/Debug.xcconfig → example/ios/Flutter/Debug.xcconfig


+ 0 - 0
ios/Flutter/Release.xcconfig → example/ios/Flutter/Release.xcconfig


+ 14 - 21
ios/Runner.xcodeproj/project.pbxproj → example/ios/Runner.xcodeproj/project.pbxproj

@@ -9,7 +9,8 @@
 /* Begin PBXBuildFile section */
 		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
 		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
-		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+		978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+		97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
 		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
 		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
 		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -32,12 +33,13 @@
 		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
 		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
 		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
-		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
-		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
 		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
 		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
 		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -72,6 +74,7 @@
 				9740EEB11CF90186004384FC /* Flutter */,
 				97C146F01CF9000F007C117D /* Runner */,
 				97C146EF1CF9000F007C117D /* Products */,
+				CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
@@ -86,6 +89,8 @@
 		97C146F01CF9000F007C117D /* Runner */ = {
 			isa = PBXGroup;
 			children = (
+				7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+				7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
 				97C146FA1CF9000F007C117D /* Main.storyboard */,
 				97C146FD1CF9000F007C117D /* Assets.xcassets */,
 				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@@ -93,8 +98,6 @@
 				97C146F11CF9000F007C117D /* Supporting Files */,
 				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
 				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
-				74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
-				74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
 			);
 			path = Runner;
 			sourceTree = "<group>";
@@ -102,6 +105,7 @@
 		97C146F11CF9000F007C117D /* Supporting Files */ = {
 			isa = PBXGroup;
 			children = (
+				97C146F21CF9000F007C117D /* main.m */,
 			);
 			name = "Supporting Files";
 			sourceTree = "<group>";
@@ -140,7 +144,6 @@
 				TargetAttributes = {
 					97C146ED1CF9000F007C117D = {
 						CreatedOnToolsVersion = 7.3.1;
-						LastSwiftMigration = 1100;
 					};
 				};
 			};
@@ -212,7 +215,8 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+				978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+				97C146F31CF9000F007C117D /* main.m in Sources */,
 				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -295,7 +299,6 @@
 			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				CLANG_ENABLE_MODULES = YES;
 				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -308,10 +311,8 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.flutter.flutterPagerList;
+				PRODUCT_BUNDLE_IDENTIFIER = com.flutter.flutterAliyunPushExample;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
-				SWIFT_VERSION = 5.0;
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Profile;
@@ -418,7 +419,6 @@
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = iphoneos;
 				SUPPORTED_PLATFORMS = iphoneos;
-				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				TARGETED_DEVICE_FAMILY = "1,2";
 				VALIDATE_PRODUCT = YES;
 			};
@@ -429,7 +429,6 @@
 			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				CLANG_ENABLE_MODULES = YES;
 				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -442,11 +441,8 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.flutter.flutterPagerList;
+				PRODUCT_BUNDLE_IDENTIFIER = com.flutter.flutterAliyunPushExample;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
-				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-				SWIFT_VERSION = 5.0;
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Debug;
@@ -456,7 +452,6 @@
 			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				CLANG_ENABLE_MODULES = YES;
 				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -469,10 +464,8 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.flutter.flutterPagerList;
+				PRODUCT_BUNDLE_IDENTIFIER = com.flutter.flutterAliyunPushExample;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
-				SWIFT_VERSION = 5.0;
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Release;

+ 0 - 0
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata → example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata


+ 0 - 0
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist → example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist


+ 0 - 0
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings → example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings


+ 0 - 0
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme → example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme


+ 0 - 0
ios/Runner.xcworkspace/contents.xcworkspacedata → example/ios/Runner.xcworkspace/contents.xcworkspacedata


+ 0 - 0
ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist → example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist


+ 0 - 0
ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings → example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings


+ 6 - 0
example/ios/Runner/AppDelegate.h

@@ -0,0 +1,6 @@
+#import <Flutter/Flutter.h>
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : FlutterAppDelegate
+
+@end

+ 13 - 0
example/ios/Runner/AppDelegate.m

@@ -0,0 +1,13 @@
+#import "AppDelegate.h"
+#import "GeneratedPluginRegistrant.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application
+    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+  [GeneratedPluginRegistrant registerWithRegistry:self];
+  // Override point for customization after application launch.
+  return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+@end

+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png → example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json → example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json


+ 0 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png → example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


+ 0 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png → example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


+ 0 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png → example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 0 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md → example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md


+ 0 - 0
ios/Runner/Base.lproj/LaunchScreen.storyboard → example/ios/Runner/Base.lproj/LaunchScreen.storyboard


+ 0 - 0
ios/Runner/Base.lproj/Main.storyboard → example/ios/Runner/Base.lproj/Main.storyboard


+ 1 - 1
ios/Runner/Info.plist → example/ios/Runner/Info.plist

@@ -11,7 +11,7 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
-	<string>flutter_pager_list</string>
+	<string>flutter_aliyun_push_example</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>

+ 9 - 0
example/ios/Runner/main.m

@@ -0,0 +1,9 @@
+#import <Flutter/Flutter.h>
+#import <UIKit/UIKit.h>
+#import "AppDelegate.h"
+
+int main(int argc, char* argv[]) {
+  @autoreleasepool {
+    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+  }
+}

+ 59 - 0
example/lib/main.dart

@@ -0,0 +1,59 @@
+import 'package:flutter/material.dart';
+import 'dart:async';
+
+import 'package:flutter/services.dart';
+import 'package:flutter_aliyun_push/flutter_aliyun_push.dart';
+
+void main() {
+  runApp(MyApp());
+}
+
+class MyApp extends StatefulWidget {
+  @override
+  _MyAppState createState() => _MyAppState();
+}
+
+class _MyAppState extends State<MyApp> {
+  String _platformVersion = 'Unknown';
+
+  @override
+  void initState() {
+    super.initState();
+    initPlatformState();
+  }
+
+  // Platform messages are asynchronous, so we initialize in an async method.
+  Future<void> initPlatformState() async {
+    String platformVersion;
+    // Platform messages may fail, so we use a try/catch PlatformException.
+    try {
+      platformVersion = await FlutterAliyunPush.platformVersion;
+      await FlutterAliyunPush.initPush;
+    } on PlatformException {
+      platformVersion = 'Failed to get platform version.';
+    }
+
+    // If the widget was removed from the tree while the asynchronous platform
+    // message was in flight, we want to discard the reply rather than calling
+    // setState to update our non-existent appearance.
+    if (!mounted) return;
+
+    setState(() {
+      _platformVersion = platformVersion;
+    });
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      home: Scaffold(
+        appBar: AppBar(
+          title: const Text('Plugin example app'),
+        ),
+        body: Center(
+          child: Text('Running on: $_platformVersion\n'),
+        ),
+      ),
+    );
+  }
+}

+ 196 - 0
example/pubspec.lock

@@ -0,0 +1,196 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+  archive:
+    dependency: transitive
+    description:
+      name: archive
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.0.13"
+  args:
+    dependency: transitive
+    description:
+      name: args
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.6.0"
+  async:
+    dependency: transitive
+    description:
+      name: async
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.4.1"
+  boolean_selector:
+    dependency: transitive
+    description:
+      name: boolean_selector
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.0.0"
+  charcode:
+    dependency: transitive
+    description:
+      name: charcode
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.1.3"
+  collection:
+    dependency: transitive
+    description:
+      name: collection
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.14.12"
+  convert:
+    dependency: transitive
+    description:
+      name: convert
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.1.1"
+  crypto:
+    dependency: transitive
+    description:
+      name: crypto
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.1.4"
+  cupertino_icons:
+    dependency: "direct main"
+    description:
+      name: cupertino_icons
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "0.1.3"
+  flutter:
+    dependency: "direct main"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_aliyun_push:
+    dependency: "direct main"
+    description:
+      path: ".."
+      relative: true
+    source: path
+    version: "0.0.1"
+  flutter_test:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  image:
+    dependency: transitive
+    description:
+      name: image
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.1.12"
+  matcher:
+    dependency: transitive
+    description:
+      name: matcher
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "0.12.6"
+  meta:
+    dependency: transitive
+    description:
+      name: meta
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.1.8"
+  path:
+    dependency: transitive
+    description:
+      name: path
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.6.4"
+  petitparser:
+    dependency: transitive
+    description:
+      name: petitparser
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.4.0"
+  quiver:
+    dependency: transitive
+    description:
+      name: quiver
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.1.3"
+  sky_engine:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.99"
+  source_span:
+    dependency: transitive
+    description:
+      name: source_span
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.7.0"
+  stack_trace:
+    dependency: transitive
+    description:
+      name: stack_trace
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.9.3"
+  stream_channel:
+    dependency: transitive
+    description:
+      name: stream_channel
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.0.0"
+  string_scanner:
+    dependency: transitive
+    description:
+      name: string_scanner
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.0.5"
+  term_glyph:
+    dependency: transitive
+    description:
+      name: term_glyph
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.1.0"
+  test_api:
+    dependency: transitive
+    description:
+      name: test_api
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "0.2.15"
+  typed_data:
+    dependency: transitive
+    description:
+      name: typed_data
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "1.1.6"
+  vector_math:
+    dependency: transitive
+    description:
+      name: vector_math
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "2.0.8"
+  xml:
+    dependency: transitive
+    description:
+      name: xml
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
+    source: hosted
+    version: "3.6.1"
+sdks:
+  dart: ">=2.7.0 <3.0.0"
+  flutter: ">=1.10.0"

+ 71 - 0
example/pubspec.yaml

@@ -0,0 +1,71 @@
+name: flutter_aliyun_push_example
+description: Demonstrates how to use the flutter_aliyun_push plugin.
+
+# The following line prevents the package from being accidentally published to
+# pub.dev using `pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+environment:
+  sdk: ">=2.7.0 <3.0.0"
+
+dependencies:
+  flutter:
+    sdk: flutter
+
+  flutter_aliyun_push:
+    # When depending on this package from a real application you should use:
+    #   flutter_aliyun_push: ^x.y.z
+    # See https://dart.dev/tools/pub/dependencies#version-constraints
+    # The example app is bundled with the plugin so we use a path dependency on
+    # the parent directory to use the current plugin's version. 
+    path: ../
+
+  # The following adds the Cupertino Icons font to your application.
+  # Use with the CupertinoIcons class for iOS style icons.
+  cupertino_icons: ^0.1.3
+
+dev_dependencies:
+  flutter_test:
+    sdk: flutter
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter.
+flutter:
+
+  # The following line ensures that the Material Icons font is
+  # included with your application, so that you can use the icons in
+  # the material Icons class.
+  uses-material-design: true
+
+  # To add assets to your application, add an assets section, like this:
+  # assets:
+  #   - images/a_dot_burr.jpeg
+  #   - images/a_dot_ham.jpeg
+
+  # An image asset can refer to one or more resolution-specific "variants", see
+  # https://flutter.dev/assets-and-images/#resolution-aware.
+
+  # For details regarding adding assets from package dependencies, see
+  # https://flutter.dev/assets-and-images/#from-packages
+
+  # To add custom fonts to your application, add a fonts section here,
+  # in this "flutter" section. Each entry in this list should have a
+  # "family" key with the font family name, and a "fonts" key with a
+  # list giving the asset and other descriptors for the font. For
+  # example:
+  # fonts:
+  #   - family: Schyler
+  #     fonts:
+  #       - asset: fonts/Schyler-Regular.ttf
+  #       - asset: fonts/Schyler-Italic.ttf
+  #         style: italic
+  #   - family: Trajan Pro
+  #     fonts:
+  #       - asset: fonts/TrajanPro.ttf
+  #       - asset: fonts/TrajanPro_Bold.ttf
+  #         weight: 700
+  #
+  # For details regarding fonts from package dependencies,
+  # see https://flutter.dev/custom-fonts/#from-packages

+ 10 - 13
test/widget_test.dart → example/test/widget_test.dart

@@ -8,23 +8,20 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_test/flutter_test.dart';
 
-import 'package:flutter_aliyun_push/main.dart';
+import 'package:flutter_aliyun_push_example/main.dart';
 
 void main() {
-  testWidgets('Counter increments smoke test', (WidgetTester tester) async {
+  testWidgets('Verify Platform version', (WidgetTester tester) async {
     // Build our app and trigger a frame.
     await tester.pumpWidget(MyApp());
 
-    // Verify that our counter starts at 0.
-    expect(find.text('0'), findsOneWidget);
-    expect(find.text('1'), findsNothing);
-
-    // Tap the '+' icon and trigger a frame.
-    await tester.tap(find.byIcon(Icons.add));
-    await tester.pump();
-
-    // Verify that our counter has incremented.
-    expect(find.text('0'), findsNothing);
-    expect(find.text('1'), findsOneWidget);
+    // Verify that platform version is retrieved.
+    expect(
+      find.byWidgetPredicate(
+        (Widget widget) => widget is Text &&
+                           widget.data.startsWith('Running on:'),
+      ),
+      findsOneWidget,
+    );
   });
 }

+ 0 - 24
flutter_pager_list.iml

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="flutter_pager_list" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="java-gradle" name="Java-Gradle">
-      <configuration>
-        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
-        <option name="BUILDABLE" value="false" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/.pub" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Dart SDK" level="project" />
-    <orderEntry type="library" name="Dart Packages" level="project" />
-  </component>
-</module>

+ 31 - 26
ios/.gitignore

@@ -1,32 +1,37 @@
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+.DS_Store
+*.swp
+profile
+
+DerivedData/
+build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
+
+*.pbxuser
 *.mode1v3
 *.mode2v3
-*.moved-aside
-*.pbxuser
 *.perspectivev3
-**/*sync/
-.sconsign.dblite
-.tags*
-**/.vagrant/
-**/DerivedData/
-Icon?
-**/Pods/
-**/.symlinks/
-profile
-xcuserdata
-**/.generated/
-Flutter/App.framework
-Flutter/Flutter.framework
-Flutter/Flutter.podspec
-Flutter/Generated.xcconfig
-Flutter/app.flx
-Flutter/app.zip
-Flutter/flutter_assets/
-Flutter/flutter_export_environment.sh
-ServiceDefinitions.json
-Runner/GeneratedPluginRegistrant.*
-
-# Exceptions to above rules.
+
+!default.pbxuser
 !default.mode1v3
 !default.mode2v3
-!default.pbxuser
 !default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+/Flutter/Generated.xcconfig
+/Flutter/flutter_export_environment.sh

+ 0 - 0
ios/Assets/.gitkeep


+ 4 - 0
ios/Classes/FlutterAliyunPushPlugin.h

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

+ 20 - 0
ios/Classes/FlutterAliyunPushPlugin.m

@@ -0,0 +1,20 @@
+#import "FlutterAliyunPushPlugin.h"
+
+@implementation FlutterAliyunPushPlugin
++ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
+  FlutterMethodChannel* channel = [FlutterMethodChannel
+      methodChannelWithName:@"flutter_aliyun_push"
+            binaryMessenger:[registrar messenger]];
+  FlutterAliyunPushPlugin* instance = [[FlutterAliyunPushPlugin alloc] init];
+  [registrar addMethodCallDelegate:instance channel:channel];
+}
+
+- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
+  if ([@"getPlatformVersion" isEqualToString:call.method]) {
+    result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
+  } else {
+    result(FlutterMethodNotImplemented);
+  }
+}
+
+@end

+ 0 - 13
ios/Runner/AppDelegate.swift

@@ -1,13 +0,0 @@
-import UIKit
-import Flutter
-
-@UIApplicationMain
-@objc class AppDelegate: FlutterAppDelegate {
-  override func application(
-    _ application: UIApplication,
-    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
-  ) -> Bool {
-    GeneratedPluginRegistrant.register(with: self)
-    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
-  }
-}

+ 0 - 1
ios/Runner/Runner-Bridging-Header.h

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

+ 23 - 0
ios/flutter_aliyun_push.podspec

@@ -0,0 +1,23 @@
+#
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
+# Run `pod lib lint flutter_aliyun_push.podspec' to validate before publishing.
+#
+Pod::Spec.new do |s|
+  s.name             = 'flutter_aliyun_push'
+  s.version          = '0.0.1'
+  s.summary          = 'A new Flutter plugin.'
+  s.description      = <<-DESC
+A new Flutter plugin.
+                       DESC
+  s.homepage         = 'http://example.com'
+  s.license          = { :file => '../LICENSE' }
+  s.author           = { 'Your Company' => 'email@example.com' }
+  s.source           = { :path => '.' }
+  s.source_files = 'Classes/**/*'
+  s.public_header_files = 'Classes/**/*.h'
+  s.dependency 'Flutter'
+  s.platform = :ios, '8.0'
+
+  # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
+  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
+end

+ 0 - 74
lib/example.dart

@@ -1,74 +0,0 @@
-import 'package:json_annotation/json_annotation.dart'; 
-  
-part 'example.g.dart';
-
-
-@JsonSerializable(explicitToJson: true)
-  class example extends Object {
-
-  @JsonKey(name: 'pageData')
-  PageData pageData;
-
-  @JsonKey(name: 'hosList')
-  List<HosList> hosList;
-
-  example(this.pageData,this.hosList,);
-
-  factory example.fromJson(Map<String, dynamic> srcJson) => _$exampleFromJson(srcJson);
-
-  Map<String, dynamic> toJson() => _$exampleToJson(this);
-
-}
-
-  
-@JsonSerializable(explicitToJson: true)
-  class PageData extends Object {
-
-  @JsonKey(name: 'pageNum')
-  int pageNum;
-
-  @JsonKey(name: 'curPage')
-  int curPage;
-
-  @JsonKey(name: 'perPage')
-  int perPage;
-
-  PageData(this.pageNum,this.curPage,this.perPage,);
-
-  factory PageData.fromJson(Map<String, dynamic> srcJson) => _$PageDataFromJson(srcJson);
-
-  Map<String, dynamic> toJson() => _$PageDataToJson(this);
-
-}
-
-  
-@JsonSerializable(explicitToJson: true)
-  class HosList extends Object {
-
-  @JsonKey(name: 'id')
-  int id;
-
-  @JsonKey(name: 'name')
-  String name;
-
-  @JsonKey(name: 'illId')
-  int illId;
-
-  @JsonKey(name: 'introduction')
-  String introduction;
-
-  @JsonKey(name: 'level')
-  String level;
-
-  @JsonKey(name: 'imgurl')
-  String imgurl;
-
-  HosList(this.id,this.name,this.illId,this.introduction,this.level,this.imgurl,);
-
-  factory HosList.fromJson(Map<String, dynamic> srcJson) => _$HosListFromJson(srcJson);
-
-  Map<String, dynamic> toJson() => _$HosListToJson(this);
-
-}
-
-  

+ 0 - 58
lib/example.g.dart

@@ -1,58 +0,0 @@
-// GENERATED CODE - DO NOT MODIFY BY HAND
-
-part of 'example.dart';
-
-// **************************************************************************
-// JsonSerializableGenerator
-// **************************************************************************
-
-example _$exampleFromJson(Map<String, dynamic> json) {
-  return example(
-    json['pageData'] == null
-        ? null
-        : PageData.fromJson(json['pageData'] as Map<String, dynamic>),
-    (json['hosList'] as List)
-        ?.map((e) =>
-            e == null ? null : HosList.fromJson(e as Map<String, dynamic>))
-        ?.toList(),
-  );
-}
-
-Map<String, dynamic> _$exampleToJson(example instance) => <String, dynamic>{
-      'pageData': instance.pageData?.toJson(),
-      'hosList': instance.hosList?.map((e) => e?.toJson())?.toList(),
-    };
-
-PageData _$PageDataFromJson(Map<String, dynamic> json) {
-  return PageData(
-    json['pageNum'] as int,
-    json['curPage'] as int,
-    json['perPage'] as int,
-  );
-}
-
-Map<String, dynamic> _$PageDataToJson(PageData instance) => <String, dynamic>{
-      'pageNum': instance.pageNum,
-      'curPage': instance.curPage,
-      'perPage': instance.perPage,
-    };
-
-HosList _$HosListFromJson(Map<String, dynamic> json) {
-  return HosList(
-    json['id'] as int,
-    json['name'] as String,
-    json['illId'] as int,
-    json['introduction'] as String,
-    json['level'] as String,
-    json['imgurl'] as String,
-  );
-}
-
-Map<String, dynamic> _$HosListToJson(HosList instance) => <String, dynamic>{
-      'id': instance.id,
-      'name': instance.name,
-      'illId': instance.illId,
-      'introduction': instance.introduction,
-      'level': instance.level,
-      'imgurl': instance.imgurl,
-    };

+ 20 - 0
lib/flutter_aliyun_push.dart

@@ -0,0 +1,20 @@
+import 'dart:async';
+
+import 'package:flutter/services.dart';
+
+class FlutterAliyunPush {
+  static const MethodChannel _channel =
+      const MethodChannel('aliyun_push');
+
+  static Future<String> get platformVersion async {
+    final String version = await _channel.invokeMethod('getPlatformVersion');
+    return version;
+  }
+
+  static Future<String> get initPush async {
+    final String version = await _channel.invokeMethod('initPush');
+    return version;
+  }
+}
+
+

+ 0 - 73
lib/main.dart

@@ -1,73 +0,0 @@
-import 'dart:async';
-import 'dart:math';
-
-import 'package:flutter/material.dart';
-import 'example.dart';
-
-
-void main() => runApp(ExampleApp());
-
-class ExampleApp extends StatelessWidget {
-  @override
-  Widget build(BuildContext context) => MaterialApp(
-        title: 'Demo',
-        theme: ThemeData(accentColor: Colors.pinkAccent),
-        home: MyHomePage(),
-      );
-}
-
-class MyHomePage extends StatefulWidget {
-  @override
-  State<StatefulWidget> createState() => MyHomePageState();
-}
-
-class MyHomePageState extends State<MyHomePage> {
-  Map <String, dynamic>resDic = {};
-
-
-  @override
-  void initState() {
-    super.initState();
-
-    _initResDic();
-    _jsonTest();
-  }
-
-  @override
-  void dispose() {
-    super.dispose();
-  }
-
-  /*初始化数据源*/
-  _initResDic() {
-    resDic = {
-        "pageData": {
-          "pageNum": 1,
-          "curPage": 1,
-          "perPage": 10
-        },
-        "hosList": [
-          {
-            "id": 190,
-            "name": "阜外医院",
-            "illId": 1,
-            "introduction": "北京阜外医院(全名:中国医学科学院阜外心血管病医院)的前身是解放军胸科医院,始建于1956年,心血管病研究所始建于1962年,由我国胸心外科的奠基人之一吴英恺院士一手创办。北京阜外医院、心血管病研究所是隶属于卫生部、中国医学科学院、中国协和医科大学的三级甲等心血管病专科医院。",
-            "level": "三甲",
-            "imgurl": "https://t.duodian.api.cheng1hu.com/attachment/hospital/2019/07/01/15/0c365acdfeb18bfc0806a7a922bee800.jpg"
-          }
-        ]
-    };
-  }
-
-  _jsonTest() {
-    example model = example.fromJson(resDic);
-    List <HosList> hosList = model.hosList;
-    HosList hosListModel = hosList[0];
-    print(model.toJson());
-  }
-  @override
-  Widget build(BuildContext context) => Scaffold(
-        body:Text('ttt'),
-      );
-
-}

+ 0 - 8
local.properties

@@ -1,8 +0,0 @@
-## This file must *NOT* be checked into Version Control Systems,
-# as it contains information specific to your local configuration.
-#
-# Location of the SDK. This is only used by Gradle.
-# For customization when using a Version Control System, please read the
-# header note.
-#Fri Jun 12 17:43:34 CST 2020
-sdk.dir=C\:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk

+ 24 - 317
pubspec.lock

@@ -1,174 +1,62 @@
 # Generated by pub
 # See https://dart.dev/tools/pub/glossary#lockfile
 packages:
-  _fe_analyzer_shared:
-    dependency: transitive
-    description:
-      name: _fe_analyzer_shared
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "5.0.0"
-  analyzer:
-    dependency: transitive
-    description:
-      name: analyzer
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.39.11"
   archive:
     dependency: transitive
     description:
       name: archive
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.0.13"
   args:
     dependency: transitive
     description:
       name: args
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.6.0"
   async:
     dependency: transitive
     description:
       name: async
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.4.1"
   boolean_selector:
     dependency: transitive
     description:
       name: boolean_selector
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.0.0"
-  build:
-    dependency: transitive
-    description:
-      name: build
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.3.0"
-  build_config:
-    dependency: transitive
-    description:
-      name: build_config
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.4.2"
-  build_daemon:
-    dependency: transitive
-    description:
-      name: build_daemon
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.1.4"
-  build_resolvers:
-    dependency: transitive
-    description:
-      name: build_resolvers
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.3.9"
-  build_runner:
-    dependency: "direct dev"
-    description:
-      name: build_runner
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.10.0"
-  build_runner_core:
-    dependency: transitive
-    description:
-      name: build_runner_core
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "5.2.0"
-  built_collection:
-    dependency: transitive
-    description:
-      name: built_collection
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "4.3.2"
-  built_value:
-    dependency: transitive
-    description:
-      name: built_value
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "7.1.0"
   charcode:
     dependency: transitive
     description:
       name: charcode
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.1.3"
-  checked_yaml:
-    dependency: transitive
-    description:
-      name: checked_yaml
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.2"
-  code_builder:
-    dependency: transitive
-    description:
-      name: code_builder
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.3.0"
   collection:
     dependency: transitive
     description:
       name: collection
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.14.12"
   convert:
     dependency: transitive
     description:
       name: convert
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.1.1"
   crypto:
     dependency: transitive
     description:
       name: crypto
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.1.4"
-  csslib:
-    dependency: transitive
-    description:
-      name: csslib
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.16.1"
-  cupertino_icons:
-    dependency: "direct main"
-    description:
-      name: cupertino_icons
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.3"
-  dart_style:
-    dependency: transitive
-    description:
-      name: dart_style
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.3.6"
-  fixnum:
-    dependency: transitive
-    description:
-      name: fixnum
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.10.11"
   flutter:
     dependency: "direct main"
     description: flutter
@@ -179,297 +67,116 @@ packages:
     description: flutter
     source: sdk
     version: "0.0.0"
-  glob:
-    dependency: transitive
-    description:
-      name: glob
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.2.0"
-  graphs:
-    dependency: transitive
-    description:
-      name: graphs
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.2.0"
-  html:
-    dependency: transitive
-    description:
-      name: html
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.14.0+3"
-  http_multi_server:
-    dependency: transitive
-    description:
-      name: http_multi_server
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.2.0"
-  http_parser:
-    dependency: transitive
-    description:
-      name: http_parser
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.1.4"
   image:
     dependency: transitive
     description:
       name: image
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.1.12"
-  io:
-    dependency: transitive
-    description:
-      name: io
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.3.4"
-  js:
-    dependency: transitive
-    description:
-      name: js
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.6.2"
-  json_annotation:
-    dependency: "direct main"
-    description:
-      name: json_annotation
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.0.1"
-  json_serializable:
-    dependency: "direct dev"
-    description:
-      name: json_serializable
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.3.0"
-  logging:
-    dependency: transitive
-    description:
-      name: logging
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.11.4"
   matcher:
     dependency: transitive
     description:
       name: matcher
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "0.12.6"
   meta:
     dependency: transitive
     description:
       name: meta
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.1.8"
-  mime:
-    dependency: transitive
-    description:
-      name: mime
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.9.6+3"
-  node_interop:
-    dependency: transitive
-    description:
-      name: node_interop
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.1.1"
-  node_io:
-    dependency: transitive
-    description:
-      name: node_io
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.1.1"
-  package_config:
-    dependency: transitive
-    description:
-      name: package_config
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.9.3"
   path:
     dependency: transitive
     description:
       name: path
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.6.4"
-  pedantic:
-    dependency: transitive
-    description:
-      name: pedantic
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.9.0"
   petitparser:
     dependency: transitive
     description:
       name: petitparser
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.4.0"
-  pool:
-    dependency: transitive
-    description:
-      name: pool
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.4.0"
-  pub_semver:
-    dependency: transitive
-    description:
-      name: pub_semver
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.4.4"
-  pubspec_parse:
-    dependency: transitive
-    description:
-      name: pubspec_parse
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.5"
   quiver:
     dependency: transitive
     description:
       name: quiver
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.1.3"
-  shelf:
-    dependency: transitive
-    description:
-      name: shelf
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.7.7"
-  shelf_web_socket:
-    dependency: transitive
-    description:
-      name: shelf_web_socket
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.2.3"
   sky_engine:
     dependency: transitive
     description: flutter
     source: sdk
     version: "0.0.99"
-  source_gen:
-    dependency: transitive
-    description:
-      name: source_gen
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.9.5"
   source_span:
     dependency: transitive
     description:
       name: source_span
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.7.0"
   stack_trace:
     dependency: transitive
     description:
       name: stack_trace
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.9.3"
   stream_channel:
     dependency: transitive
     description:
       name: stream_channel
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.0.0"
-  stream_transform:
-    dependency: transitive
-    description:
-      name: stream_transform
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.2.0"
   string_scanner:
     dependency: transitive
     description:
       name: string_scanner
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.0.5"
   term_glyph:
     dependency: transitive
     description:
       name: term_glyph
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.1.0"
   test_api:
     dependency: transitive
     description:
       name: test_api
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "0.2.15"
-  timing:
-    dependency: transitive
-    description:
-      name: timing
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.1+2"
   typed_data:
     dependency: transitive
     description:
       name: typed_data
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "1.1.6"
   vector_math:
     dependency: transitive
     description:
       name: vector_math
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "2.0.8"
-  watcher:
-    dependency: transitive
-    description:
-      name: watcher
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.9.7+15"
-  web_socket_channel:
-    dependency: transitive
-    description:
-      name: web_socket_channel
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.1.0"
   xml:
     dependency: transitive
     description:
       name: xml
-      url: "https://pub.flutter-io.cn"
+      url: "https://mirrors.cloud.tencent.com/dart-pub"
     source: hosted
     version: "3.6.1"
-  yaml:
-    dependency: transitive
-    description:
-      name: yaml
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.2.1"
 sdks:
   dart: ">=2.7.0 <3.0.0"
+  flutter: ">=1.10.0"

+ 27 - 44
pubspec.yaml

@@ -1,67 +1,50 @@
 name: flutter_aliyun_push
-description: 阿里云推送,支持安卓厂商通道
+description: A new Flutter plugin.
 version: 0.0.1
-homepage: https://github.com/linbing520/flutter_aliyun_push
-
-# The following line prevents the package from being accidentally published to
-# pub.dev using `pub publish`. This is preferred for private packages.
-#publish_to: 'none' # Remove this line if you wish to publish to pub.dev
-
-# The following defines the version and build number for your application.
-# A version number is three numbers separated by dots, like 1.2.43
-# followed by an optional build number separated by a +.
-# Both the version and the builder number may be overridden in flutter
-# build by specifying --build-name and --build-number, respectively.
-# In Android, build-name is used as versionName while build-number used as versionCode.
-# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
-# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
-# Read more about iOS versioning at
-# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-
+author:
+homepage:
 
 environment:
   sdk: ">=2.7.0 <3.0.0"
+  flutter: ">=1.10.0"
 
 dependencies:
   flutter:
     sdk: flutter
 
-
-  # The following adds the Cupertino Icons font to your application.
-  # Use with the CupertinoIcons class for iOS style icons.
-  cupertino_icons: ^0.1.3
-  json_annotation: ^3.0.0
-
 dev_dependencies:
   flutter_test:
     sdk: flutter
-  build_runner: ^1.6.5 # 用于自动生成代码
-  json_serializable: ^3.3.0
 
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
 
 # The following section is specific to Flutter.
 flutter:
-
-  # The following line ensures that the Material Icons font is
-  # included with your application, so that you can use the icons in
-  # the material Icons class.
-  uses-material-design: true
-
-  # To add assets to your application, add an assets section, like this:
-#  assets:
-#     - imgs/empty.png
-#     - imgs/error.png
-
-
+  # This section identifies this Flutter project as a plugin project.
+  # The 'pluginClass' and Android 'package' identifiers should not ordinarily
+  # be modified. They are used by the tooling to maintain consistency when
+  # adding or updating assets for this project.
+  plugin:
+    platforms:
+      android:
+        package: com.flutter.flutter_aliyun_push
+        pluginClass: FlutterAliyunPushPlugin
+      ios:
+        pluginClass: FlutterAliyunPushPlugin
+
+  # To add assets to your plugin package, add an assets section, like this:
+  # assets:
+  #   - images/a_dot_burr.jpeg
+  #   - images/a_dot_ham.jpeg
+  #
+  # For details regarding assets in packages, see
+  # https://flutter.dev/assets-and-images/#from-packages
+  #
   # An image asset can refer to one or more resolution-specific "variants", see
   # https://flutter.dev/assets-and-images/#resolution-aware.
 
-  # For details regarding adding assets from package dependencies, see
-  # https://flutter.dev/assets-and-images/#from-packages
-
-  # To add custom fonts to your application, add a fonts section here,
+  # To add custom fonts to your plugin package, add a fonts section here,
   # in this "flutter" section. Each entry in this list should have a
   # "family" key with the font family name, and a "fonts" key with a
   # list giving the asset and other descriptors for the font. For
@@ -78,5 +61,5 @@ flutter:
   #       - asset: fonts/TrajanPro_Bold.ttf
   #         weight: 700
   #
-  # For details regarding fonts from package dependencies,
-  # see https://flutter.dev/custom-fonts/#from-packages
+  # For details regarding fonts in packages, see
+  # https://flutter.dev/custom-fonts/#from-packages

+ 23 - 0
test/flutter_aliyun_push_test.dart

@@ -0,0 +1,23 @@
+import 'package:flutter/services.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:flutter_aliyun_push/flutter_aliyun_push.dart';
+
+void main() {
+  const MethodChannel channel = MethodChannel('flutter_aliyun_push');
+
+  TestWidgetsFlutterBinding.ensureInitialized();
+
+  setUp(() {
+    channel.setMockMethodCallHandler((MethodCall methodCall) async {
+      return '42';
+    });
+  });
+
+  tearDown(() {
+    channel.setMockMethodCallHandler(null);
+  });
+
+  test('getPlatformVersion', () async {
+    expect(await FlutterAliyunPush.platformVersion, '42');
+  });
+}