Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
a290cd06
提交
a290cd06
authored
1月 09, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
最近学习基本布局
上级
0f979ee6
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
160 行增加
和
10 行删除
+160
-10
index.dart
lib/apis/index.dart
+2
-0
mine.dart
lib/apis/mine.dart
+6
-0
view.dart
lib/pages/course/view.dart
+3
-3
view.dart
lib/pages/main/view.dart
+5
-5
controller.dart
lib/pages/study_history/controller.dart
+2
-0
index.dart
lib/pages/study_history/index.dart
+14
-0
view.dart
lib/pages/study_history/view.dart
+26
-0
item.dart
lib/pages/study_history/widgets/item.dart
+87
-0
index.dart
lib/routes/index.dart
+1
-0
routes.dart
lib/routes/routes.dart
+11
-0
styles.dart
lib/utils/styles.dart
+3
-2
没有找到文件。
lib/apis/index.dart
浏览文件 @
a290cd06
...
@@ -8,3 +8,4 @@ import '../models/user_model.dart';
...
@@ -8,3 +8,4 @@ import '../models/user_model.dart';
import
'../services/index.dart'
;
import
'../services/index.dart'
;
part
'account.dart'
;
part
'account.dart'
;
part
'mine.dart'
;
\ No newline at end of file
lib/apis/mine.dart
0 → 100644
浏览文件 @
a290cd06
part of
apis
;
abstract
class
MineAPI
{
}
\ No newline at end of file
lib/pages/course/view.dart
浏览文件 @
a290cd06
...
@@ -30,12 +30,12 @@ class _CoursePageState extends State<CoursePage> {
...
@@ -30,12 +30,12 @@ class _CoursePageState extends State<CoursePage> {
padding:
EdgeInsets
.
zero
,
padding:
EdgeInsets
.
zero
,
backgroundColor:
Colors
.
transparent
,
backgroundColor:
Colors
.
transparent
,
icon:
const
Icon
(
Ionicons
.
timer
),
icon:
const
Icon
(
Ionicons
.
timer
),
// onPressed: () => context.pushNamed(Routes.msgs
),
onPressed:
()
=>
context
.
pushNamed
(
Routes
.
studyHistory
),
),
),
GestureDetector
(
GestureDetector
(
onTap:
(){
onTap:
(){
//
context.pushNamed(Routes.msgs);
context
.
pushNamed
(
Routes
.
msgs
);
controller
.
logout
(
context
);
//
controller.logout(context);
},
},
child:
badges
.
Badge
(
child:
badges
.
Badge
(
position:
badges
.
BadgePosition
.
topEnd
(
top:
-
5
,
end:
0
),
position:
badges
.
BadgePosition
.
topEnd
(
top:
-
5
,
end:
0
),
...
...
lib/pages/main/view.dart
浏览文件 @
a290cd06
...
@@ -50,12 +50,12 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{
...
@@ -50,12 +50,12 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{
builder:
(
controller
)
=>
BottomNavigationBar
(
builder:
(
controller
)
=>
BottomNavigationBar
(
currentIndex:
controller
.
currentPage
,
currentIndex:
controller
.
currentPage
,
onTap:
(
page
){
onTap:
(
page
){
if
(
page
!=
1
&&
!
UserStore
.
to
.
isLogin
)
{
// if (page != 1 && !UserStore.to.isLogin) {
context
.
pushNamed
(
Routes
.
login
);
// context.pushNamed(Routes.login);
}
else
{
// } else {
controller
.
pageController
.
jumpToPage
(
page
);
}
// controller.pageController.jumpToPage(page);
// controller.pageController.jumpToPage(page);
// }
controller
.
pageController
.
jumpToPage
(
page
);
},
},
items:
[
items:
[
BottomNavigationBarItem
(
BottomNavigationBarItem
(
...
...
lib/pages/study_history/controller.dart
0 → 100644
浏览文件 @
a290cd06
part of
study_history
;
\ No newline at end of file
lib/pages/study_history/index.dart
0 → 100644
浏览文件 @
a290cd06
library
study_history
;
import
'package:flutter/material.dart'
;
import
'../../theme.dart'
;
import
'../../utils/index.dart'
;
part
'view.dart'
;
part
'controller.dart'
;
part
'widgets/item.dart'
;
\ No newline at end of file
lib/pages/study_history/view.dart
0 → 100644
浏览文件 @
a290cd06
part of
study_history
;
class
StudyHistoryPage
extends
StatefulWidget
{
const
StudyHistoryPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
StudyHistoryPage
>
createState
()
=>
_StudyHistoryPageState
();
}
class
_StudyHistoryPageState
extends
State
<
StudyHistoryPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
centerTitle:
true
,
title:
const
Text
(
'最近学习'
),
),
body:
ListView
.
builder
(
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
BuildDayItem
();
},
itemCount:
4
,
),
);
}
}
lib/pages/study_history/widgets/item.dart
0 → 100644
浏览文件 @
a290cd06
part of
study_history
;
class
BuildDayItem
extends
StatelessWidget
{
const
BuildDayItem
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
// height: 300,
margin:
EdgeInsets
.
only
(
left:
10
,
top:
10
,
right:
10
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
boxShadow:
[
BoxShadow
(
color:
Colours
.
cC7
.
withOpacity
(
0.5
),
offset:
const
Offset
(
1
,
3
),
blurRadius:
10
,
spreadRadius:
0
,
),
],
color:
Colors
.
white
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
height:
32
,
color:
Colors
.
cyan
,
alignment:
Alignment
.
centerLeft
,
child:
Text
(
'今天'
,
style:
TextStyle
(
fontSize:
13
,
height:
1.4
,
color:
Colours
.
c6
),),
),
ListView
.
builder
(
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
BuildContext
context
,
int
index
){
return
_buildItem
();
},
itemCount:
2
,
)
],
),
);
}
Widget
_buildItem
(){
return
Container
(
margin:
EdgeInsets
.
only
(
left:
10
,
right:
10
),
child:
Column
(
children:
[
Container
(
color:
Colours
.
cF0
,
height:
2
,
),
Container
(
margin:
EdgeInsets
.
only
(
top:
11.5
,
bottom:
14.5
),
child:
Row
(
children:
[
Container
(
width:
72
,
height:
87
,
color:
Colors
.
red
,
),
Column
(
children:
[
Text
(
'从现在开始,为精彩活过一百'
,
style:
TextStyle
(
fontSize:
14
,
height:
1.5
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,),
Text
(
'李白'
,
style:
TextStyle
(
fontSize:
12
,
height:
1.4
,
color:
Colours
.
c6
),),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Container
(
color:
Colors
.
cyan
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
3.5
),
child:
const
Text
(
'未学习'
,
style:
TextStyle
(
fontSize:
11
,
height:
1.3
,
color:
Colours
.
c9
),),
),
const
Text
(
'继续学习'
,
style:
TextStyle
(
fontSize:
11
,
height:
1.3
,
color:
AppTheme
.
primary
),)
],
)
],
)
],
),
)
],
),
);
}
}
lib/routes/index.dart
浏览文件 @
a290cd06
...
@@ -14,6 +14,7 @@ import 'package:flutter_book/pages/main/index.dart';
...
@@ -14,6 +14,7 @@ import 'package:flutter_book/pages/main/index.dart';
import
'package:flutter_book/pages/reset_pwd/index.dart'
;
import
'package:flutter_book/pages/reset_pwd/index.dart'
;
import
'package:flutter_book/pages/search/index.dart'
;
import
'package:flutter_book/pages/search/index.dart'
;
import
'package:flutter_book/pages/splash/index.dart'
;
import
'package:flutter_book/pages/splash/index.dart'
;
import
'package:flutter_book/pages/study_history/index.dart'
;
import
'package:flutter_book/pages/study_report/index.dart'
;
import
'package:flutter_book/pages/study_report/index.dart'
;
import
'package:flutter_book/pages/user_coin/index.dart'
;
import
'package:flutter_book/pages/user_coin/index.dart'
;
import
'package:flutter_book/pages/user_info/index.dart'
;
import
'package:flutter_book/pages/user_info/index.dart'
;
...
...
lib/routes/routes.dart
浏览文件 @
a290cd06
...
@@ -65,6 +65,8 @@ abstract class Routes {
...
@@ -65,6 +65,8 @@ abstract class Routes {
static
const
msgs
=
'msgs'
;
static
const
msgs
=
'msgs'
;
// 关于
// 关于
static
const
about
=
'about'
;
static
const
about
=
'about'
;
// 最近学习
static
const
studyHistory
=
'study_history'
;
static
final
GoRouter
config
=
GoRouter
(
static
final
GoRouter
config
=
GoRouter
(
...
@@ -248,6 +250,15 @@ abstract class Routes {
...
@@ -248,6 +250,15 @@ abstract class Routes {
child:
const
SearchPage
()
child:
const
SearchPage
()
)
)
),
),
GoRoute
(
path:
'/
$studyHistory
'
,
name:
studyHistory
,
pageBuilder:
(
context
,
state
)
=>
CupertinoPage
(
name:
state
.
uri
.
toString
(),
key:
state
.
pageKey
,
child:
const
StudyHistoryPage
()
)
),
]
]
);
);
...
...
lib/utils/styles.dart
浏览文件 @
a290cd06
...
@@ -23,14 +23,15 @@ class Colours {
...
@@ -23,14 +23,15 @@ class Colours {
static
const
c6
=
Color
(
0xFF666666
);
static
const
c6
=
Color
(
0xFF666666
);
static
const
cLine
=
Color
(
0xFFF0F0F0
);
static
const
cLine
=
Color
(
0xFFF0F0F0
);
static
const
cBlue
=
Color
(
0xFF2A82D9
);
static
const
cBlue
=
Color
(
0xFF2A82D9
);
static
const
cE0
=
Color
(
0xFFE0E0E0
);
static
const
cE2
=
Color
(
0xFFE2E2E2
);
static
const
cE2
=
Color
(
0xFFE2E2E2
);
static
const
cE5
=
Color
(
0xFFE5E5E5
);
static
const
cE5
=
Color
(
0xFFE5E5E5
);
static
const
cE7
=
Color
(
0xFFE7E7E7
);
static
const
cF0
=
Color
(
0xFFF0F0F0
);
static
const
cF2
=
Color
(
0xFFF2F2F2
);
static
const
cF2
=
Color
(
0xFFF2F2F2
);
static
const
cF4
=
Color
(
0xFFF4F4F4
);
static
const
cF4
=
Color
(
0xFFF4F4F4
);
static
const
cF9
=
Color
(
0xFFF9F9F9
);
static
const
cF9
=
Color
(
0xFFF9F9F9
);
static
const
cC7
=
Color
(
0xFFC7C7C7
);
static
const
cC7
=
Color
(
0xFFC7C7C7
);
static
const
cE0
=
Color
(
0xFFE0E0E0
);
static
const
cE7
=
Color
(
0xFFE7E7E7
);
}
}
class
Gaps
{
class
Gaps
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论