Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
c6602b7a
提交
c6602b7a
authored
8月 19, 2018
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
share response
上级
4b29996a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
8 行删除
+13
-8
WeChatPluginMethods.java
...kotlin/com/jarvan/fluwx/constant/WeChatPluginMethods.java
+1
-1
FluwxShareHandler.kt
...main/kotlin/com/jarvan/fluwx/handler/FluwxShareHandler.kt
+1
-1
fluwx_class.dart
lib/src/fluwx_class.dart
+11
-6
没有找到文件。
android/src/main/kotlin/com/jarvan/fluwx/constant/WeChatPluginMethods.java
浏览文件 @
c6602b7a
...
@@ -8,7 +8,7 @@ package com.jarvan.fluwx.constant;
...
@@ -8,7 +8,7 @@ package com.jarvan.fluwx.constant;
public
class
WeChatPluginMethods
{
public
class
WeChatPluginMethods
{
public
static
final
String
REGISTER_APP
=
"registerApp"
;
public
static
final
String
REGISTER_APP
=
"registerApp"
;
public
static
final
String
UNREGISTER_APP
=
"unregisterApp"
;
public
static
final
String
UNREGISTER_APP
=
"unregisterApp"
;
public
static
final
String
WE_CHAT_
RESPONSE
=
"onWeChat
Response"
;
public
static
final
String
WE_CHAT_
SHARE_RESPONSE
=
"onShare
Response"
;
public
static
final
String
SHARE_TEXT
=
"shareText"
;
public
static
final
String
SHARE_TEXT
=
"shareText"
;
public
static
final
String
SHARE_IMAGE
=
"shareImage"
;
public
static
final
String
SHARE_IMAGE
=
"shareImage"
;
...
...
android/src/main/kotlin/com/jarvan/fluwx/handler/FluwxShareHandler.kt
浏览文件 @
c6602b7a
...
@@ -335,7 +335,7 @@ object FluwxShareHandler {
...
@@ -335,7 +335,7 @@ object FluwxShareHandler {
WechatPluginKeys
.
PLATFORM
to
"android"
WechatPluginKeys
.
PLATFORM
to
"android"
)
)
channel
?.
invokeMethod
(
WeChatPluginMethods
.
WE_CHAT_RESPONSE
,
result
)
channel
?.
invokeMethod
(
WeChatPluginMethods
.
WE_CHAT_
SHARE_
RESPONSE
,
result
)
}
}
...
...
lib/src/fluwx_class.dart
浏览文件 @
c6602b7a
...
@@ -17,10 +17,10 @@ class Fluwx {
...
@@ -17,10 +17,10 @@ class Fluwx {
static
const
MethodChannel
_channel
=
const
MethodChannel
(
'fluwx'
);
static
const
MethodChannel
_channel
=
const
MethodChannel
(
'fluwx'
);
StreamController
<
Map
>
_response
Stream
Controller
=
StreamController
<
Map
>
_response
FromShare
Controller
=
new
StreamController
.
broadcast
();
new
StreamController
.
broadcast
();
Stream
<
Map
>
get
weChatResponseUpdate
=>
_responseStream
Controller
.
stream
;
Stream
<
Map
>
get
responseFromShare
=>
_responseFromShare
Controller
.
stream
;
///the [model] should not be null
///the [model] should not be null
static
Future
registerApp
(
RegisterModel
model
)
async
{
static
Future
registerApp
(
RegisterModel
model
)
async
{
...
@@ -35,9 +35,14 @@ class Fluwx {
...
@@ -35,9 +35,14 @@ class Fluwx {
_channel
.
setMethodCallHandler
(
_handler
);
_channel
.
setMethodCallHandler
(
_handler
);
}
}
void
dispose
()
{
void
dispose
All
()
{
_response
Stream
Controller
.
close
();
_response
FromShare
Controller
.
close
();
}
}
void
disposeResponseFromShare
(){
_responseFromShareController
.
close
();
}
///the [model] can not be null
///the [model] can not be null
///see [WeChatShareWebPageModel]
///see [WeChatShareWebPageModel]
/// [WeChatShareTextModel]
/// [WeChatShareTextModel]
...
@@ -54,8 +59,8 @@ class Fluwx {
...
@@ -54,8 +59,8 @@ class Fluwx {
}
}
Future
<
dynamic
>
_handler
(
MethodCall
methodCall
)
{
Future
<
dynamic
>
_handler
(
MethodCall
methodCall
)
{
if
(
"on
WeChat
Response"
==
methodCall
.
method
)
{
if
(
"on
Share
Response"
==
methodCall
.
method
)
{
_response
Stream
Controller
.
add
(
methodCall
.
arguments
);
_response
FromShare
Controller
.
add
(
methodCall
.
arguments
);
}
}
return
Future
.
value
(
true
);
return
Future
.
value
(
true
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论