Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
c36b01ce
提交
c36b01ce
authored
8月 19, 2018
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reformat code
上级
0c5f0530
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
24 行增加
和
35 行删除
+24
-35
fluwx.dart
lib/fluwx.dart
+3
-3
fluwx_class.dart
lib/src/fluwx_class.dart
+4
-2
flutter_register_model.dart
lib/src/models/flutter_register_model.dart
+4
-10
wechat_share_models.dart
lib/src/models/wechat_share_models.dart
+5
-6
wechat_reponse.dart
lib/src/wechat_reponse.dart
+7
-8
wechat_scene.dart
lib/src/wechat_scene.dart
+1
-6
没有找到文件。
lib/fluwx.dart
浏览文件 @
c36b01ce
library
fluwx
;
export
'src/fluwx_class.dart'
;
export
'src/models/flutter_register_model.dart'
;
export
'src/models/wechat_share_models.dart'
;
export
'src/wechat_scene.dart'
;
export
'src/wechat_reponse.dart'
;
export
'src/models/flutter_register_model.dart'
;
\ No newline at end of file
export
'src/wechat_scene.dart'
;
lib/src/fluwx_class.dart
浏览文件 @
c36b01ce
import
'dart:async'
;
import
'package:flutter/services.dart'
;
import
'models/flutter_register_model.dart'
;
import
'models/wechat_share_models.dart'
;
...
...
@@ -25,9 +26,10 @@ class Fluwx {
return
await
_channel
.
invokeMethod
(
"registerApp"
,
model
.
toMap
());
}
static
Future
unregisterApp
(
RegisterModel
model
)
async
{
return
await
_channel
.
invokeMethod
(
"unregisterApp"
,
model
.
toMap
());
static
Future
unregisterApp
(
RegisterModel
model
)
async
{
return
await
_channel
.
invokeMethod
(
"unregisterApp"
,
model
.
toMap
());
}
void
listen
()
{
_channel
.
setMethodCallHandler
(
_handler
);
}
...
...
lib/src/models/flutter_register_model.dart
浏览文件 @
c36b01ce
...
...
@@ -3,15 +3,9 @@ class RegisterModel {
final
bool
doOnIOS
;
final
bool
doOnAndroid
;
RegisterModel
({
this
.
appId
,
this
.
doOnIOS
:
true
,
this
.
doOnAndroid
:
true
});
Map
toMap
(){
return
{
"appId"
:
appId
,
"iOS"
:
doOnIOS
,
"android"
:
doOnAndroid
};
RegisterModel
({
this
.
appId
,
this
.
doOnIOS
:
true
,
this
.
doOnAndroid
:
true
});
Map
toMap
()
{
return
{
"appId"
:
appId
,
"iOS"
:
doOnIOS
,
"android"
:
doOnAndroid
};
}
}
lib/src/models/wechat_share_models.dart
浏览文件 @
c36b01ce
...
...
@@ -77,11 +77,10 @@ class WeChatShareMiniProgramModel extends WeChatShareModel {
final
String
thumbnail
;
WeChatShareMiniProgramModel
(
{
@required
this
.
webPageUrl
,
{
@required
this
.
webPageUrl
,
int
miniProgramType
,
this
.
userName
,
this
.
path
:
"/"
,
this
.
path
:
"/"
,
this
.
title
,
this
.
description
,
this
.
thumbnail
,
...
...
@@ -95,7 +94,7 @@ class WeChatShareMiniProgramModel extends WeChatShareModel {
assert
(
webPageUrl
!=
null
&&
webPageUrl
.
isNotEmpty
),
assert
(
userName
!=
null
&&
userName
.
isNotEmpty
),
assert
(
path
!=
null
&&
path
.
isNotEmpty
),
assert
(
miniProgramType
<
3
&&
miniProgramType
>
-
1
),
assert
(
miniProgramType
<
3
&&
miniProgramType
>
-
1
),
super
(
mediaTagName:
mediaTagName
,
messageAction:
messageAction
,
...
...
@@ -199,9 +198,9 @@ class WeChatShareMusicModel extends WeChatShareModel {
_transaction:
transaction
,
_scene:
scene
.
toString
(),
"musicUrl"
:
musicUrl
,
"musicDataUrl"
:
musicDataUrl
,
"musicDataUrl"
:
musicDataUrl
,
"musicLowBandUrl"
:
musicLowBandUrl
,
"musicLowBandDataUrl"
:
musicLowBandDataUrl
,
"musicLowBandDataUrl"
:
musicLowBandDataUrl
,
_thumbnail:
thumbnail
,
_title:
title
,
_description:
description
,
...
...
lib/src/wechat_reponse.dart
浏览文件 @
c36b01ce
...
...
@@ -8,10 +8,10 @@ class WeChatResponseCode {
static
const
int
ERR_BAN
=
-
6
;
}
class
WeChatResponseKey
{
static
const
String
TYPE
=
"type"
;
static
const
String
ERR_CODE
=
"errCode"
;
static
const
String
ERR_STR
=
"errStr"
;
static
const
String
TRANSACTION
=
"transaction"
;
static
const
String
OPEN_ID
=
"openId"
;
}
\ No newline at end of file
class
WeChatResponseKey
{
static
const
String
TYPE
=
"type"
;
static
const
String
ERR_CODE
=
"errCode"
;
static
const
String
ERR_STR
=
"errStr"
;
static
const
String
TRANSACTION
=
"transaction"
;
static
const
String
OPEN_ID
=
"openId"
;
}
lib/src/wechat_scene.dart
浏览文件 @
c36b01ce
enum
WeChatScene
{
SESSION
,
TIMELINE
,
FAVORITE
}
enum
WeChatScene
{
SESSION
,
TIMELINE
,
FAVORITE
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论