提交 21ceea79 authored 作者: yueweilu's avatar yueweilu

UI 修改

上级 2fddab5b
...@@ -167,8 +167,8 @@ class _BuildItemState extends State<BuildItem> { ...@@ -167,8 +167,8 @@ class _BuildItemState extends State<BuildItem> {
}); });
}, },
child: SizedBox( child: SizedBox(
width: 20.w, width: 12.w,
height: 20.w, height: 6.w,
// color: Colors.red, // color: Colors.red,
child: Image.asset('assets/images/down.png') child: Image.asset('assets/images/down.png')
), ),
......
...@@ -27,7 +27,7 @@ class BuildItem extends StatelessWidget { ...@@ -27,7 +27,7 @@ class BuildItem extends StatelessWidget {
child: Text( child: Text(
model.helpTitle ?? '', model.helpTitle ?? '',
style: TextStyle( style: TextStyle(
fontSize: 12.w, height: 1.5.w, color: Colours.c9), fontSize: 12.w, height: 1.5.w, color: Colours.c3),
), ),
), ),
], ],
......
...@@ -47,78 +47,91 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{ ...@@ -47,78 +47,91 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{
), ),
bottomNavigationBar: GetBuilder<MainController>( bottomNavigationBar: GetBuilder<MainController>(
id: 'navigation', id: 'navigation',
builder: (controller) => BottomNavigationBar( builder: (controller) => Container(
currentIndex:controller.currentPage , decoration: BoxDecoration(
onTap: (page){ color: Colors.white,
if (page != 1 && !UserStore.to.isLogin) { boxShadow:[
context.pushNamed(Routes.login); BoxShadow(
} else { color: const Color(0xFFE0E0E0).withOpacity(0.5),
controller.pageController.jumpToPage(page); spreadRadius: 0,
} blurRadius: 4.5,
// controller.pageController.jumpToPage(page); offset: const Offset(0, 0),
}, ),
items: [ ],
BottomNavigationBarItem( ),
child: BottomNavigationBar(
currentIndex:controller.currentPage ,
onTap: (page){
if (page != 1 && !UserStore.to.isLogin) {
context.pushNamed(Routes.login);
} else {
controller.pageController.jumpToPage(page);
}
// controller.pageController.jumpToPage(page);
},
items: [
BottomNavigationBarItem(
icon: Image.asset(
'assets/images/course.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
activeIcon:Image.asset(
'assets/images/course_select.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
label: '课程',
),
BottomNavigationBarItem(
icon: Image.asset( icon: Image.asset(
'assets/images/course.png', 'assets/images/library.png',
width: 25, width: 25,
height: 27.5, height: 27.5,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
activeIcon:Image.asset( activeIcon:Image.asset(
'assets/images/course_select.png', 'assets/images/library_select.png',
width: 25, width: 25,
height: 27.5, height: 27.5,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
label: '课程', label: '图书馆',
),
BottomNavigationBarItem(
icon: Image.asset(
'assets/images/library.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
activeIcon:Image.asset(
'assets/images/library_select.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
label: '图书馆',
),
BottomNavigationBarItem(
icon: Image.asset(
'assets/images/shujia.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
activeIcon:Image.asset(
'assets/images/shujia_select.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
), ),
label: '书架', BottomNavigationBarItem(
), icon: Image.asset(
BottomNavigationBarItem( 'assets/images/shujia.png',
icon: Image.asset( width: 25,
'assets/images/mine.png', height: 27.5,
width: 25, fit: BoxFit.cover,
height: 27.5, ),
fit: BoxFit.cover, activeIcon:Image.asset(
), 'assets/images/shujia_select.png',
activeIcon:Image.asset( width: 25,
'assets/images/mine_select.png', height: 27.5,
width: 25, fit: BoxFit.cover,
height: 27.5, ),
fit: BoxFit.cover, label: '书架',
), ),
label: '我的', BottomNavigationBarItem(
) icon: Image.asset(
] 'assets/images/mine.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
activeIcon:Image.asset(
'assets/images/mine_select.png',
width: 25,
height: 27.5,
fit: BoxFit.cover,
),
label: '我的',
)
]
),
), ),
), ),
) )
......
...@@ -82,10 +82,11 @@ class BuildDayItem extends StatelessWidget { ...@@ -82,10 +82,11 @@ class BuildDayItem extends StatelessWidget {
Expanded( Expanded(
child: Container( child: Container(
// color: Colors.green, // color: Colors.green,
height: 86.w,
padding: EdgeInsets.only(top: 2.5.w,left: 13.w), padding: EdgeInsets.only(top: 2.5.w,left: 13.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -95,7 +96,7 @@ class BuildDayItem extends StatelessWidget { ...@@ -95,7 +96,7 @@ class BuildDayItem extends StatelessWidget {
Text(courseModel.authors??'',style: TextStyle(fontSize: 12.w,height: 1.4,color: Colours.c6),), Text(courseModel.authors??'',style: TextStyle(fontSize: 12.w,height: 1.4,color: Colours.c6),),
], ],
), ),
Gaps.vGaps25, // Gaps.vGaps25,
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
...@@ -107,7 +108,7 @@ class BuildDayItem extends StatelessWidget { ...@@ -107,7 +108,7 @@ class BuildDayItem extends StatelessWidget {
// Spacer(), // Spacer(),
Container( Container(
width: 120, width: 120,
alignment: Alignment.centerRight, alignment: Alignment.centerLeft,
child: Text('上次读到:${courseModel.lastChapter}',style: TextStyle(fontSize: 11.w,height: 1.3,color: Colours.c6),maxLines: 1,overflow: TextOverflow.ellipsis,), child: Text('上次读到:${courseModel.lastChapter}',style: TextStyle(fontSize: 11.w,height: 1.3,color: Colours.c6),maxLines: 1,overflow: TextOverflow.ellipsis,),
) )
], ],
......
...@@ -24,44 +24,50 @@ class BuildCard extends StatelessWidget { ...@@ -24,44 +24,50 @@ class BuildCard extends StatelessWidget {
right: 0, right: 0,
child: Container( child: Container(
padding: EdgeInsets.only(left: 17.5.w,top:25.w,right: 20.w,bottom: 20.w), padding: EdgeInsets.only(left: 17.5.w,top:25.w,right: 20.w,bottom: 20.w),
child: Row( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded( Text(model.bookName??'',style: TextStyle(fontSize: 18.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),),
child: Column( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text(model.bookName??'',style: TextStyle(fontSize: 18.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),), Expanded(
Gaps.vGaps15, child: Column(
Row( mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('学习总进度',style: TextStyle(fontSize: 15.w,height: 1.4,color: Colors.white),), // Text(model.bookName??'',style: TextStyle(fontSize: 18.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),),
Gaps.hGaps15, Gaps.vGaps15,
Text(model.progress??'',style: TextStyle(fontSize: 16.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),), Row(
children: [
Text('学习总进度',style: TextStyle(fontSize: 15.w,height: 1.4,color: Colors.white),),
Gaps.hGaps15,
Text(model.progress??'',style: TextStyle(fontSize: 16.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),),
]
),
Gaps.vGaps10,
Row(
children: [
Text('学习总时长',style: TextStyle(fontSize: 15.w,height: 1.4,color: Colors.white),),
Gaps.hGaps15,
Text('${model.readSecond??''}分钟',style: TextStyle(fontSize: 16.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),),
]
),
Gaps.vGaps10,
Text('上次读到',style: TextStyle(fontSize: 15.w,height: 1.4,color: Colors.white),),
Gaps.vGaps5,
Text(model.lastChapter??'',style: TextStyle(fontSize: 16.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),maxLines: 1,overflow: TextOverflow.ellipsis,),
] ]
), ),
Gaps.vGaps10, ),
Row( CustomCard(
children: [ url: model.img ?? '',
Text('学习总时长',style: TextStyle(fontSize: 15.w,height: 1.4,color: Colors.white),), height: 120.w,
Gaps.hGaps15, width: 100.w,
Text('${model.readSecond??''}分钟',style: TextStyle(fontSize: 16.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),), )
] ],
),
Gaps.vGaps10,
Text('上次读到',style: TextStyle(fontSize: 15.w,height: 1.4,color: Colors.white),),
Gaps.vGaps5,
Text(model.lastChapter??'',style: TextStyle(fontSize: 16.w,height: 1.4,color: Colors.white,fontWeight: Fonts.boldSemi),maxLines: 1,overflow: TextOverflow.ellipsis,),
]
),
), ),
Container(
height: 120.w,
width: 100.w,
child: CustomImage.network(url: model.img??''),
)
], ],
), ),
) )
......
...@@ -378,8 +378,8 @@ class CustomInputSearch extends StatelessWidget { ...@@ -378,8 +378,8 @@ class CustomInputSearch extends StatelessWidget {
onTap: onTap, onTap: onTap,
style: TextStyle( style: TextStyle(
// fontFamily: 'Sans', // fontFamily: 'Sans',
fontSize: 16.w, fontSize: 12.w,
height: 1.2, height: 1.5,
), ),
decoration: InputDecoration( decoration: InputDecoration(
border: OutlineInputBorder( border: OutlineInputBorder(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论