Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
11160bf2
提交
11160bf2
authored
10月 19, 2018
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lauch mini program demo
上级
abf207a4
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
66 行增加
和
1 行删除
+66
-1
launch_mini_program_page.dart
example/lib/launch_mini_program_page.dart
+56
-0
main.dart
example/lib/main.dart
+10
-1
没有找到文件。
example/lib/launch_mini_program_page.dart
0 → 100644
浏览文件 @
11160bf2
import
'package:flutter/material.dart'
;
import
'package:fluwx/fluwx.dart'
as
fluwx
;
class
LaunchMiniProgramPage
extends
StatefulWidget
{
@override
_LaunchMiniProgramPageState
createState
()
=>
_LaunchMiniProgramPageState
();
}
class
_LaunchMiniProgramPageState
extends
State
<
LaunchMiniProgramPage
>
{
String
_result
=
"无"
;
@override
void
initState
()
{
super
.
initState
();
fluwx
.
responseFromLaunchMiniProgram
.
listen
((
data
)
{
setState
(()
{
_result
=
"
${data.extMsg}
"
;
});
});
}
@override
void
dispose
()
{
super
.
dispose
();
_result
=
null
;
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
"Launch MiniProgrom"
),
),
body:
Column
(
children:
<
Widget
>[
OutlineButton
(
onPressed:
()
{
fluwx
.
launchMiniProgram
(
username:
"gh_d43f693ca31f"
).
then
((
data
)
{
print
(
data
);
});
},
child:
const
Text
(
"Launch MiniProgrom"
),
),
const
Text
(
"响应结果;"
),
Text
(
_result
)
],
),
);
}
}
example/lib/main.dart
浏览文件 @
11160bf2
...
@@ -11,7 +11,7 @@ import 'share_music.dart';
...
@@ -11,7 +11,7 @@ import 'share_music.dart';
import
'share_text_image.dart'
;
import
'share_text_image.dart'
;
import
'share_video_page.dart'
;
import
'share_video_page.dart'
;
import
'share_web_page.dart'
;
import
'share_web_page.dart'
;
import
'package:fluwx_example/launch_mini_program_page.dart'
;
void
main
(
)
=>
runApp
(
new
MyApp
());
void
main
(
)
=>
runApp
(
new
MyApp
());
class
MyApp
extends
StatefulWidget
{
class
MyApp
extends
StatefulWidget
{
...
@@ -43,6 +43,7 @@ class _MyAppState extends State<MyApp> {
...
@@ -43,6 +43,7 @@ class _MyAppState extends State<MyApp> {
"sendAuth"
:
(
context
)
=>
SendAuthPage
(),
"sendAuth"
:
(
context
)
=>
SendAuthPage
(),
"shareMiniProgram"
:
(
context
)
=>
ShareMiniProgramPage
(),
"shareMiniProgram"
:
(
context
)
=>
ShareMiniProgramPage
(),
"pay"
:
(
context
)
=>
PayPage
(),
"pay"
:
(
context
)
=>
PayPage
(),
"launchMiniProgram"
:
(
context
)
=>
LaunchMiniProgramPage
()
},
},
home:
new
Scaffold
(
home:
new
Scaffold
(
appBar:
new
AppBar
(
appBar:
new
AppBar
(
...
@@ -123,6 +124,14 @@ class ShareSelectorPage extends StatelessWidget {
...
@@ -123,6 +124,14 @@ class ShareSelectorPage extends StatelessWidget {
},
},
child:
const
Text
(
"pay"
)),
child:
const
Text
(
"pay"
)),
),
),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
new
OutlineButton
(
onPressed:
()
{
Navigator
.
of
(
context
).
pushNamed
(
"launchMiniProgram"
);
},
child:
const
Text
(
"Launch MiniProgram"
)),
),
],
],
),
),
);
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论