Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
190f3778
提交
190f3778
authored
1月 22, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
闪屏到广告页逻辑
上级
7482d330
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
27 行删除
+39
-27
view.dart
lib/pages/ad/view.dart
+27
-18
index.dart
lib/pages/splash/index.dart
+1
-0
view.dart
lib/pages/splash/view.dart
+11
-9
没有找到文件。
lib/pages/ad/view.dart
浏览文件 @
190f3778
...
...
@@ -13,25 +13,34 @@ class _AdPageState extends State<AdPage> {
return
GetBuilder
<
AdController
>(
init:
AdController
(
context
),
builder:
(
controller
)
=>
Scaffold
(
body:
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Container
(
height:
200
.
w
,
width:
200
.
w
,
color:
Colors
.
lime
,
),
SizedBox
(
height:
20
.
w
),
Text
(
'倒计时:
${controller._countdown}
'
,
style:
TextStyle
(
fontSize:
20
.
w
body:
Stack
(
fit:
StackFit
.
expand
,
children:
[
Container
(
color:
Colors
.
green
,
),
Positioned
(
top:
40
.
w
,
right:
20
.
w
,
child:
GestureDetector
(
onTap:
(){
context
.
goNamed
(
Routes
.
main
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
12.0
.
w
,
vertical:
8.0
.
w
),
decoration:
BoxDecoration
(
color:
Colors
.
black
.
withOpacity
(
0.6
),
borderRadius:
BorderRadius
.
circular
(
8.0
.
w
),
),
child:
Text
(
'跳过
${controller._countdown}
s'
,
style:
const
TextStyle
(
color:
Colors
.
white
),
),
),
)
,
],
)
,
)
,
)
)
]
,
)
)
);
...
...
lib/pages/splash/index.dart
浏览文件 @
190f3778
...
...
@@ -2,6 +2,7 @@ library splash_page;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_book/apis/index.dart'
;
import
'package:flutter_book/widgets/index.dart'
;
import
'package:go_router/go_router.dart'
;
...
...
lib/pages/splash/view.dart
浏览文件 @
190f3778
...
...
@@ -15,11 +15,13 @@ class _SplashPageState extends State<SplashPage> {
Future
.
wait
([
Future
.
delayed
(
const
Duration
(
seconds:
2
))
]).
whenComplete
(()
async
{
// final userModel = await AccountAPI.login(phone: '18337678567', password: '013790d7eb52197bead4c757ebfae7cf', type: '1');
// Console.log('++++++++++++++++');
// Console.log(userModel.name);
// context.goNamed(Routes.main);
context
.
pushReplacementNamed
(
Routes
.
ad
);
final
ads
=
await
CommonAPI
.
list
(
type:
'1'
);
if
(
ads
.
isNotEmpty
){
context
.
pushReplacementNamed
(
Routes
.
ad
,
extra:
ads
);
}
else
{
context
.
pushReplacementNamed
(
Routes
.
main
);
}
});
...
...
@@ -47,10 +49,10 @@ class _SplashPageState extends State<SplashPage> {
),
)
),
Expanded
(
flex:
2
,
child:
Center
(
child:
CupertinoActivityIndicator
(),),
)
//
Expanded(
//
flex: 2,
//
child: Center(child: CupertinoActivityIndicator(),),
//
)
],
),
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论