提交 0f236174 authored 作者: JarvanMo's avatar JarvanMo

结构调整

上级 07539a8e
...@@ -49,7 +49,7 @@ flutter { ...@@ -49,7 +49,7 @@ flutter {
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
......
...@@ -2,8 +2,7 @@ import 'dart:async'; ...@@ -2,8 +2,7 @@ import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:wechat_plugin/src/wechat_share_models.dart'; import 'package:wechat_plugin/fluwx.dart';
import 'package:wechat_plugin/wechat_plugin.dart';
void main() => runApp(new MyApp()); void main() => runApp(new MyApp());
...@@ -20,8 +19,8 @@ class _MyAppState extends State<MyApp> { ...@@ -20,8 +19,8 @@ class _MyAppState extends State<MyApp> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WechatPlugin.init("wxd930ea5d5a258f4f");
initPlatformState(); initPlatformState();
Fluwx.init("wxd930ea5d5a258f4f");
} }
// Platform messages are asynchronous, so we initialize in an async method. // Platform messages are asynchronous, so we initialize in an async method.
...@@ -54,8 +53,8 @@ class _MyAppState extends State<MyApp> { ...@@ -54,8 +53,8 @@ class _MyAppState extends State<MyApp> {
body: new Center( body: new Center(
child: GestureDetector( child: GestureDetector(
onTap:(){ onTap:(){
var wx = WechatPlugin(); var fluwx =Fluwx();
wx.shareText(WeChatShareTextModel(text: "wq kcg r", fluwx.shareText(WeChatShareTextModel(text: "wq kcg r",
transaction: "xxxx${DateTime.now().millisecondsSinceEpoch}", transaction: "xxxx${DateTime.now().millisecondsSinceEpoch}",
)); ));
} , } ,
......
library fluwe;
export 'src/wechat_plugin.dart';
export 'src/wechat_share_models.dart';
export 'src/wechat_scene.dart';
export 'src/wechat_reponse.dart';
\ No newline at end of file
...@@ -3,7 +3,7 @@ import 'dart:async'; ...@@ -3,7 +3,7 @@ import 'dart:async';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:wechat_plugin/src/wechat_share_models.dart'; import 'package:wechat_plugin/src/wechat_share_models.dart';
class WechatPlugin { class Fluwx {
static const MethodChannel _channel = const MethodChannel('wechat_plugin'); static const MethodChannel _channel = const MethodChannel('wechat_plugin');
......
import 'package:wechat_plugin/src/wechat_scene.dart'; import 'wechat_scene.dart';
const String _scene = "scene"; const String _scene = "scene";
const String _transaction = "transaction"; const String _transaction = "transaction";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论