提交 c582e965 authored 作者: yueweilu's avatar yueweilu

修正

上级 ed335851
...@@ -7,6 +7,7 @@ import 'package:easy_refresh/easy_refresh.dart'; ...@@ -7,6 +7,7 @@ import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/utils/index.dart'; import 'package:flutter_book/utils/index.dart';
import 'package:flutter_book/widgets/index.dart'; import 'package:flutter_book/widgets/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_slidable/flutter_slidable.dart'; import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
......
...@@ -13,20 +13,20 @@ class BookCell extends StatelessWidget { ...@@ -13,20 +13,20 @@ class BookCell extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius:BorderRadius.circular(5), borderRadius:BorderRadius.circular(5.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: model.selected?AppTheme.primary.withOpacity(0.21):const Color(0xFFC7C7C7).withOpacity(0.5), color: model.selected?AppTheme.primary.withOpacity(0.21):const Color(0xFFC7C7C7).withOpacity(0.5),
spreadRadius: 0, spreadRadius: 0.w,
blurRadius: 10, blurRadius: 10.w,
offset: const Offset(3, 0), // changes the position of the shadow offset: Offset(3.w, 0), // changes the position of the shadow
), ),
], ],
border:model.selected?Border.all(width: 0.5,color: AppTheme.primary):null, border:model.selected?Border.all(width: 0.5.w,color: AppTheme.primary):null,
), ),
margin: const EdgeInsets.only(left: 10,right: 10,top: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 10.w),
height: 110, height: 110.w,
child: Slidable( child: Slidable(
endActionPane: ActionPane( endActionPane: ActionPane(
motion: const ScrollMotion(), motion: const ScrollMotion(),
...@@ -47,19 +47,19 @@ class BookCell extends StatelessWidget { ...@@ -47,19 +47,19 @@ class BookCell extends StatelessWidget {
children: [ children: [
///左侧 ///左侧
Container( Container(
margin: const EdgeInsets.only(left: 12,right: 11), margin: EdgeInsets.only(left: 12.w,right: 11.w),
child: Row( child: Row(
children: [ children: [
SizedBox( SizedBox(
height: 17, height: 17.w,
width: 17, width: 17.w,
// color: Colors.cyan, // color: Colors.cyan,
child: Image.asset(model.selected?'assets/images/pay_check.png':'assets/images/pay_uncheck.png'), child: Image.asset(model.selected?'assets/images/pay_check.png':'assets/images/pay_uncheck.png'),
), ),
const SizedBox(width: 12,), SizedBox(width: 12.w,),
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
) )
], ],
...@@ -68,7 +68,7 @@ class BookCell extends StatelessWidget { ...@@ -68,7 +68,7 @@ class BookCell extends StatelessWidget {
///右侧 ///右侧
Expanded( Expanded(
child: Container( child: Container(
padding: const EdgeInsets.only(top: 12,bottom: 10), padding: EdgeInsets.only(top: 12.w,bottom: 10.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -76,12 +76,12 @@ class BookCell extends StatelessWidget { ...@@ -76,12 +76,12 @@ class BookCell extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 13,fontWeight: Fonts.medium,color: Colours.c3),maxLines: 2,overflow: TextOverflow.ellipsis,), Text(model.bookName??'',style: TextStyle(fontSize: 13.w,fontWeight: Fonts.medium,color: Colours.c3),maxLines: 2,overflow: TextOverflow.ellipsis,),
const SizedBox(height: 5,), SizedBox(height: 5.w,),
Text(model.authors??'',style: const TextStyle(fontSize: 11,color: Colours.c9)), Text(model.authors??'',style: TextStyle(fontSize: 11.w,color: Colours.c9)),
], ],
), ),
Text('¥${model.vipPrice??''}',style: const TextStyle(fontSize: 14,fontWeight: FontWeight.w500,color: AppTheme.primary)), Text('¥${model.vipPrice??''}',style: TextStyle(fontSize: 14.w,fontWeight: FontWeight.w500,color: AppTheme.primary)),
], ],
), ),
), ),
......
...@@ -12,7 +12,7 @@ class BuildCounter extends StatelessWidget { ...@@ -12,7 +12,7 @@ class BuildCounter extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Colors.white, color: Colors.white,
padding: const EdgeInsets.only(left: 20,right: 15), padding: EdgeInsets.only(left: 20.w,right: 15.w),
child: Column( child: Column(
children: [ children: [
Row( Row(
...@@ -29,17 +29,17 @@ class BuildCounter extends StatelessWidget { ...@@ -29,17 +29,17 @@ class BuildCounter extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
SizedBox( SizedBox(
height: 17, height: 17.w,
width: 17, width: 17.w,
child: Image.asset(controller.all?'assets/images/pay_check.png':'assets/images/pay_uncheck.png'), child: Image.asset(controller.all?'assets/images/pay_check.png':'assets/images/pay_uncheck.png'),
), ),
const SizedBox(width: 11), SizedBox(width: 11.w),
const Text('全选',style: TextStyle(color: Color(0xFF333333),fontSize: 12,fontWeight: FontWeight.w500)), Text('全选',style: TextStyle(color: const Color(0xFF333333),fontSize: 12.w,fontWeight: FontWeight.w500)),
], ],
), ),
), ),
), ),
const SizedBox(width: 15,), SizedBox(width: 15.w,),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -56,21 +56,21 @@ class BuildCounter extends StatelessWidget { ...@@ -56,21 +56,21 @@ class BuildCounter extends StatelessWidget {
} }
}, },
child: Container( child: Container(
margin: const EdgeInsets.symmetric(vertical: 9), margin: EdgeInsets.symmetric(vertical: 9.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.5), borderRadius: BorderRadius.circular(17.5.w),
color: AppTheme.primary color: AppTheme.primary
), ),
// height: 35, // height: 35,
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 20), padding: EdgeInsets.symmetric(vertical: 8.w,horizontal: 20.w),
child: Text('结算(${controller.num})',style: const TextStyle(fontSize: 14,color: Colors.white,height: 1.1,fontWeight: Fonts.medium),), child: Text('结算(${controller.num})',style: TextStyle(fontSize: 14.w,color: Colors.white,height: 1.1,fontWeight: Fonts.medium),),
), ),
) )
], ],
), ),
Container( Container(
height: 1, height: 1.w,
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
) )
], ],
......
...@@ -19,24 +19,24 @@ class _ChangePhonePageState extends State<ChangePhonePage> { ...@@ -19,24 +19,24 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
title: const Text('修改手机号'), title: const Text('修改手机号'),
), ),
body: Container( body: Container(
margin: const EdgeInsets.only(left: 10, right: 10,top: 15), margin: EdgeInsets.only(left: 10.w, right: 10.w,top: 15.w),
child: Column( child: Column(
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withOpacity(0.35),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: CustomFormInput( child: CustomFormInput(
// label: 'Phone', // label: 'Phone',
// required: true, // required: true,
...@@ -61,19 +61,19 @@ class _ChangePhonePageState extends State<ChangePhonePage> { ...@@ -61,19 +61,19 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withOpacity(0.35),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: CustomFormInput( child: CustomFormInput(
// label: 'Phone', // label: 'Phone',
// required: true, // required: true,
...@@ -93,16 +93,16 @@ class _ChangePhonePageState extends State<ChangePhonePage> { ...@@ -93,16 +93,16 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
), ),
), ),
Positioned( Positioned(
right: 10, right: 10.w,
child: Row( child: Row(
children: [ children: [
Container(height: 20,width: 1,color: const Color(0xFFEBEBEB),), Container(height: 20.w,width: 1.w,color: const Color(0xFFEBEBEB),),
Gaps.hGaps10, Gaps.hGaps10,
GestureDetector( GestureDetector(
child: Container( child: Container(
padding: const EdgeInsets.symmetric(vertical: 10), padding: EdgeInsets.symmetric(vertical: 10.w),
// color: Colors.yellow, // color: Colors.yellow,
child: Text(controller.isCounting?'${controller.countDown}':'获取验证码',style: const TextStyle(fontSize: 11,color: AppTheme.primary,height: 1.4),)), child: Text(controller.isCounting?'${controller.countDown}':'获取验证码',style: TextStyle(fontSize: 11.w,color: AppTheme.primary,height: 1.4),)),
onTap: (){ onTap: (){
if (controller.isCounting == false){ if (controller.isCounting == false){
controller.sendCode(); controller.sendCode();
......
...@@ -24,7 +24,7 @@ class _ChangePwdPageState extends State<ChangePwdPage> { ...@@ -24,7 +24,7 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
title: Text(widget.type =='1'?'设置密码':'修改密码'), title: Text(widget.type =='1'?'设置密码':'修改密码'),
), ),
body: Container( body: Container(
margin: const EdgeInsets.only(left: 10,top: 15,right: 10), margin: EdgeInsets.only(left: 10.w,top: 15.w,right: 10.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -32,19 +32,19 @@ class _ChangePwdPageState extends State<ChangePwdPage> { ...@@ -32,19 +32,19 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
valueListenable: controller.showPassword, valueListenable: controller.showPassword,
builder:(context, value, child) => Container( builder:(context, value, child) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withOpacity(0.35),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: CustomFormInput( child: CustomFormInput(
obscureText: !value, obscureText: !value,
hintText: '请输入新密码', hintText: '请输入新密码',
...@@ -79,14 +79,14 @@ class _ChangePwdPageState extends State<ChangePwdPage> { ...@@ -79,14 +79,14 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withOpacity(0.35),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: CustomFormInput( child: CustomFormInput(
obscureText: !value, obscureText: !value,
hintText: '请再次输入密码', hintText: '请再次输入密码',
...@@ -112,8 +112,8 @@ class _ChangePwdPageState extends State<ChangePwdPage> { ...@@ -112,8 +112,8 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
), ),
), ),
Container( Container(
margin: const EdgeInsets.only(left: 5,top: 5), margin: EdgeInsets.only(left: 5.w,top: 5.w),
child: const Text('密码必须是6-20个英文字母、数字或符号',style: TextStyle(fontSize: 10,color: Colours.c9),), child: Text('密码必须是6-20个英文字母、数字或符号',style: TextStyle(fontSize: 10.w,color: Colours.c9),),
), ),
Gaps.vGaps40, Gaps.vGaps40,
CustomGradientButton( CustomGradientButton(
......
...@@ -43,9 +43,9 @@ class _CoursePageState extends State<CoursePage> { ...@@ -43,9 +43,9 @@ class _CoursePageState extends State<CoursePage> {
// 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.w, end: 0),
showBadge: controller.num == 0?false:true, showBadge: controller.num == 0?false:true,
badgeContent: Text(controller.num.toString(),style: const TextStyle(fontSize: 7,color: Colors.white),), badgeContent: Text(controller.num.toString(),style: TextStyle(fontSize: 7.w,color: Colors.white),),
badgeStyle: const badges.BadgeStyle( badgeStyle: const badges.BadgeStyle(
badgeColor: AppTheme.primary, badgeColor: AppTheme.primary,
shape: badges.BadgeShape.circle shape: badges.BadgeShape.circle
...@@ -69,7 +69,7 @@ class _CoursePageState extends State<CoursePage> { ...@@ -69,7 +69,7 @@ class _CoursePageState extends State<CoursePage> {
controller.ads.isNotEmpty? controller.ads.isNotEmpty?
Container( Container(
color: Colors.transparent, color: Colors.transparent,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
child: BuildBanner(items:controller.ads), child: BuildBanner(items:controller.ads),
):const SizedBox(), ):const SizedBox(),
Expanded( Expanded(
...@@ -78,11 +78,11 @@ class _CoursePageState extends State<CoursePage> { ...@@ -78,11 +78,11 @@ class _CoursePageState extends State<CoursePage> {
onRefresh: controller.onRefresh, onRefresh: controller.onRefresh,
onLoading: controller.onLoading, onLoading: controller.onLoading,
child: GridView.builder( child: GridView.builder(
padding: const EdgeInsets.only(left: 13,top: 10), padding: EdgeInsets.only(left: 13.w,top: 10.w),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
crossAxisSpacing: 0, crossAxisSpacing: 0,
mainAxisSpacing: 10, mainAxisSpacing: 10.w,
childAspectRatio: 0.85 childAspectRatio: 0.85
), ),
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
......
...@@ -29,7 +29,7 @@ class BuildBanner extends StatelessWidget { ...@@ -29,7 +29,7 @@ class BuildBanner extends StatelessWidget {
child: Container( child: Container(
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Color.fromRGBO( color: Color.fromRGBO(
random.nextInt(256), // Red random.nextInt(256), // Red
random.nextInt(256), // Green random.nextInt(256), // Green
......
...@@ -11,19 +11,19 @@ class Book extends StatelessWidget { ...@@ -11,19 +11,19 @@ class Book extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
margin: const EdgeInsets.only(right: 13), margin: EdgeInsets.only(right: 13.w),
padding: const EdgeInsets.only(left: 10,right: 10,bottom: 13.5,top: 16.5), padding: EdgeInsets.only(left: 10.w,right: 10.w,bottom: 13.5.w,top: 16.5.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
...@@ -41,8 +41,8 @@ class Book extends StatelessWidget { ...@@ -41,8 +41,8 @@ class Book extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c3),maxLines: 1,overflow: TextOverflow.ellipsis,), Text(model.bookName??'',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c3),maxLines: 1,overflow: TextOverflow.ellipsis,),
Text(model.authors ??'',style: const TextStyle(fontSize:12,height: 1.3,color: Colours.c6,),textAlign: TextAlign.left,), Text(model.authors ??'',style: TextStyle(fontSize:12.w,height: 1.3,color: Colours.c6,),textAlign: TextAlign.left,),
], ],
), ),
), ),
...@@ -52,10 +52,10 @@ class Book extends StatelessWidget { ...@@ -52,10 +52,10 @@ class Book extends StatelessWidget {
children: [ children: [
Container( Container(
color: model.type ==0||model.type ==1 ?Colours.cEF :AppTheme.primary.withOpacity(0.1), color: model.type ==0||model.type ==1 ?Colours.cEF :AppTheme.primary.withOpacity(0.1),
padding: const EdgeInsets.symmetric(horizontal: 3.5), padding: EdgeInsets.symmetric(horizontal: 3.5.w),
child: Text(model.typeName,style: TextStyle(fontSize: 11,height: 1.3,color: model.type ==0||model.type ==1 ?Colours.c9:AppTheme.primary),), child: Text(model.typeName,style: TextStyle(fontSize: 11.w,height: 1.3,color: model.type ==0||model.type ==1 ?Colours.c9:AppTheme.primary),),
), ),
model.type == 2? const Text('继续学习',style: TextStyle(fontSize: 11,height: 1.3,color: AppTheme.primary,fontWeight: Fonts.medium),):const SizedBox() model.type == 2? Text('继续学习',style: TextStyle(fontSize: 11.w,height: 1.3,color: AppTheme.primary,fontWeight: Fonts.medium),):const SizedBox()
], ],
) )
], ],
......
...@@ -20,22 +20,22 @@ class CreditPointsPage extends StatelessWidget { ...@@ -20,22 +20,22 @@ class CreditPointsPage extends StatelessWidget {
// 积分卡片 // 积分卡片
Container( Container(
color: AppTheme.primary.withOpacity(0.02), color: AppTheme.primary.withOpacity(0.02),
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10.w),
child: Container( child: Container(
padding: const EdgeInsets.only(left: 17,top: 18,bottom: 24,right: 17), padding: EdgeInsets.only(left: 17.w,top: 18.w,bottom: 24.w,right: 17.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(0, 3), offset: Offset(0, 3.w),
blurRadius: 4, blurRadius: 4.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
borderRadius: BorderRadius.circular(8) borderRadius: BorderRadius.circular(8)
), ),
height: 175, height: 175.w,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -52,16 +52,16 @@ class CreditPointsPage extends StatelessWidget { ...@@ -52,16 +52,16 @@ class CreditPointsPage extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
height: 0.5, height: 0.5.w,
color: Colours.cE7, color: Colours.cE7,
), ),
), ),
Gaps.hGaps15, Gaps.hGaps15,
const Text('积分支付不能超过每笔订单的20%',style: TextStyle(fontSize: 12,height: 1.4,color: Colours.c9),), Text('积分支付不能超过每笔订单的20%',style: TextStyle(fontSize: 12.w,height: 1.4,color: Colours.c9),),
Gaps.hGaps15, Gaps.hGaps15,
Expanded( Expanded(
child: Container( child: Container(
height: 0.5, height: 0.5.w,
color: Colours.cE7, color: Colours.cE7,
), ),
), ),
...@@ -74,26 +74,26 @@ class CreditPointsPage extends StatelessWidget { ...@@ -74,26 +74,26 @@ class CreditPointsPage extends StatelessWidget {
// 使用积分 // 使用积分
Container( Container(
// height: 105, // height: 105,
padding: const EdgeInsets.all(20), padding: EdgeInsets.all(20.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(0, 3), offset: Offset(0, 3.w),
blurRadius: 4, blurRadius: 4.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
borderRadius: BorderRadius.circular(8) borderRadius: BorderRadius.circular(8.w)
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Text('可用积分',style: TextStyle(fontSize: 16,height: 1.4,fontWeight: Fonts.medium,color: Colours.c3),), Text('可用积分',style: TextStyle(fontSize: 16.w,height: 1.4,fontWeight: Fonts.medium,color: Colours.c3),),
Gaps.vGaps10, Gaps.vGaps10,
Container( Container(
height: 0.5, height: 0.5.w,
color: Colours.cE7, color: Colours.cE7,
// color: Colors.red, // color: Colors.red,
), ),
...@@ -101,16 +101,16 @@ class CreditPointsPage extends StatelessWidget { ...@@ -101,16 +101,16 @@ class CreditPointsPage extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
RichText(text: const TextSpan( RichText(text: TextSpan(
children: [ children: [
TextSpan(text: '抵扣',style: TextStyle(color: Colours.c9,fontSize: 13,height: 1.4)), TextSpan(text: '抵扣',style: TextStyle(color: Colours.c9,fontSize: 13.w,height: 1.4)),
TextSpan(text: '¥9.90',style: TextStyle(color: AppTheme.primary,fontSize: 13,height: 1.4,fontWeight: Fonts.medium)), TextSpan(text: '¥9.90',style: TextStyle(color: AppTheme.primary,fontSize: 13.w,height: 1.4,fontWeight: Fonts.medium)),
TextSpan(text: '使用9900积分',style: TextStyle(color: Colours.c9,fontSize: 13,height: 1.4)), TextSpan(text: '使用9900积分',style: TextStyle(color: Colours.c9,fontSize: 13.w,height: 1.4)),
] ]
)), )),
SizedBox( SizedBox(
width: 15, width: 15.w,
height: 15, height: 15.w,
child: Image.asset( child: Image.asset(
'assets/images/uncheck.png', 'assets/images/uncheck.png',
), ),
......
...@@ -5,6 +5,7 @@ import 'dart:async'; ...@@ -5,6 +5,7 @@ import 'dart:async';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
......
...@@ -19,7 +19,7 @@ class _ForgetPwdPageState extends State<ForgetPwdPage> { ...@@ -19,7 +19,7 @@ class _ForgetPwdPageState extends State<ForgetPwdPage> {
title: const Text('忘记密码'), title: const Text('忘记密码'),
), ),
body: Container( body: Container(
margin: const EdgeInsets.only(left: 10, right: 10,top: 15), margin: EdgeInsets.only(left: 10.w, right: 10.w,top: 15.w),
child: Column( child: Column(
children: [ children: [
CustomFormInput( CustomFormInput(
...@@ -47,16 +47,16 @@ class _ForgetPwdPageState extends State<ForgetPwdPage> { ...@@ -47,16 +47,16 @@ class _ForgetPwdPageState extends State<ForgetPwdPage> {
}, },
), ),
Positioned( Positioned(
right: 10, right: 10.w,
child: Row( child: Row(
children: [ children: [
Container(height: 20,width: 1,color: const Color(0xFFEBEBEB),), Container(height: 20.w,width: 1.w,color: const Color(0xFFEBEBEB),),
Gaps.hGaps10, Gaps.hGaps10,
GestureDetector( GestureDetector(
child: Container( child: Container(
padding: const EdgeInsets.symmetric(vertical: 10), padding: EdgeInsets.symmetric(vertical: 10.w),
color: Colors.yellow, color: Colors.yellow,
child: Text(controller.isCounting?'${controller.countDown}':'获取验证码',style: const TextStyle(fontSize: 11,color: AppTheme.primary,height: 1.4),)), child: Text(controller.isCounting?'${controller.countDown}':'获取验证码',style: TextStyle(fontSize: 11.w,color: AppTheme.primary,height: 1.4),)),
onTap: (){ onTap: (){
if (controller.isCounting == false){ if (controller.isCounting == false){
controller.sendCode(); controller.sendCode();
......
...@@ -36,7 +36,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient ...@@ -36,7 +36,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient
width: double.infinity, width: double.infinity,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(width: 0.5,color: Colours.cE5) border: Border.all(width: 0.5.w,color: Colours.cE5)
), ),
child: Row( child: Row(
children: [ children: [
...@@ -46,9 +46,9 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient ...@@ -46,9 +46,9 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient
border: const Border(bottom: BorderSide(color: Colors.transparent, width: 0.0)), // 将指示器的底边框颜色设置为透明 border: const Border(bottom: BorderSide(color: Colors.transparent, width: 0.0)), // 将指示器的底边框颜色设置为透明
color: const Color(0xFFC02D55).withOpacity(0.08) color: const Color(0xFFC02D55).withOpacity(0.08)
), ),
labelStyle: const TextStyle(color: AppTheme.primary,fontSize: 14,height: 1.5,fontWeight: Fonts.medium), labelStyle: TextStyle(color: AppTheme.primary,fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium),
unselectedLabelColor: Colours.c9, unselectedLabelColor: Colours.c9,
unselectedLabelStyle: const TextStyle(color: Colours.c9,fontSize: 14,height: 1.5), unselectedLabelStyle: TextStyle(color: Colours.c9,fontSize: 14.w,height: 1.5),
controller: controller.tabController, controller: controller.tabController,
isScrollable: true, isScrollable: true,
tabs: controller.categories.map((model){ tabs: controller.categories.map((model){
...@@ -74,16 +74,16 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient ...@@ -74,16 +74,16 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient
// ); // );
}, },
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
alignment: Alignment.center, alignment: Alignment.center,
// color: Colors.cyan, // color: Colors.cyan,
height: 38, height: 38.w,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Container( Container(
width: 12, width: 12.w,
height: 12, height: 12.w,
// color: Colors.red, // color: Colors.red,
alignment: Alignment.center, alignment: Alignment.center,
child: Image.asset( child: Image.asset(
...@@ -91,7 +91,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient ...@@ -91,7 +91,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient
), ),
), ),
Gaps.hGaps5, Gaps.hGaps5,
const Text('筛选',style: TextStyle(color: Colours.c9,fontSize: 14,height: 1.5),) Text('筛选',style: TextStyle(color: Colours.c9,fontSize: 14.w,height: 1.5),)
], ],
), ),
// width: 75, // width: 75,
...@@ -102,7 +102,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient ...@@ -102,7 +102,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient
), ),
), ),
Container( Container(
height: 43, height: 43.w,
color: Colours.cF9, color: Colours.cF9,
child: ListView.builder( child: ListView.builder(
scrollDirection:Axis.horizontal , scrollDirection:Axis.horizontal ,
...@@ -119,7 +119,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient ...@@ -119,7 +119,7 @@ class _LibraryPageState extends State<LibraryPage> with AutomaticKeepAliveClient
), ),
Container( Container(
color: Colors.transparent, color: Colors.transparent,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
child: BuildBanner(items: controller.ads,), child: BuildBanner(items: controller.ads,),
), ),
Expanded( Expanded(
......
...@@ -12,23 +12,23 @@ class LibraryCell extends StatelessWidget { ...@@ -12,23 +12,23 @@ class LibraryCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: const EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10.w),
height: 150, height: 150.w,
// color: Colors.red, // color: Colors.red,
child: Stack( child: Stack(
children: [ children: [
Container( Container(
padding: const EdgeInsets.only(left: 10,top: 10,bottom: 20), padding: EdgeInsets.only(left: 10.w,top: 10.w,bottom: 20.w),
margin: const EdgeInsets.only(top:15,left: 10,right: 10), margin: EdgeInsets.only(top:15.w,left: 10.w,right: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), // 阴影颜色 color: Colours.cC7.withOpacity(0.5), // 阴影颜色
spreadRadius: 2, // 阴影扩散半径 spreadRadius: 2.w, // 阴影扩散半径
blurRadius: 5, // 阴影模糊半径 blurRadius: 5.w, // 阴影模糊半径
offset: const Offset(0, 2), // 阴影偏移 offset: Offset(0, 2.w), // 阴影偏移
), ),
], ],
...@@ -37,14 +37,14 @@ class LibraryCell extends StatelessWidget { ...@@ -37,14 +37,14 @@ class LibraryCell extends StatelessWidget {
children: [ children: [
/// 左侧 /// 左侧
Container( Container(
width: 100, width: 100.w,
height: 120, height: 120.w,
color: Colors.red, color: Colors.red,
), ),
/// 右侧 /// 右侧
Expanded( Expanded(
child: Container( child: Container(
margin: const EdgeInsets.only(left: 10,right: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w),
// color: Colors.red, // color: Colors.red,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -52,21 +52,21 @@ class LibraryCell extends StatelessWidget { ...@@ -52,21 +52,21 @@ class LibraryCell extends StatelessWidget {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
// SizedBox(height: 10,), // SizedBox(height: 10,),
Text(model.bookName??'',overflow: TextOverflow.ellipsis,maxLines: 2,style: const TextStyle(fontSize: 14,fontWeight: Fonts.medium,height: 1.5,color: Colours.c3),), Text(model.bookName??'',overflow: TextOverflow.ellipsis,maxLines: 2,style: TextStyle(fontSize: 14.w,fontWeight: Fonts.medium,height: 1.5,color: Colours.c3),),
// const SizedBox(height: 4,), // const SizedBox(height: 4,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text(model.authors??'',style: const TextStyle(fontSize: 11,color: Colours.c9,height: 1.5),), Text(model.authors??'',style: TextStyle(fontSize: 11.w,color: Colours.c9,height: 1.5),),
Row( Row(
children: [ children: [
Text('${model.readNum.toString()}人读过',style:const TextStyle(fontSize: 11,height: 1.5,color: Colours.cC7)), Text('${model.readNum.toString()}人读过',style: TextStyle(fontSize: 11.w,height: 1.5,color: Colours.cC7)),
Gaps.hGaps5, Gaps.hGaps5,
GestureDetector( GestureDetector(
onTap: onTap, onTap: onTap,
child: SizedBox( child: SizedBox(
width: 20, width: 20.w,
height: 20, height: 20.w,
// color: Colors.yellow, // color: Colors.yellow,
child: Image.asset( child: Image.asset(
model.isCollection == 0? 'assets/images/unlove.png':'assets/images/love.png', model.isCollection == 0? 'assets/images/unlove.png':'assets/images/love.png',
......
...@@ -33,7 +33,7 @@ class _FilterPageState extends State<FilterPage> { ...@@ -33,7 +33,7 @@ class _FilterPageState extends State<FilterPage> {
Container( Container(
color: Colors.white, color: Colors.white,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(bottom: 10), padding: EdgeInsets.only(bottom: 10.w),
child: Column( child: Column(
children: [ children: [
Column( Column(
...@@ -50,7 +50,7 @@ class _FilterPageState extends State<FilterPage> { ...@@ -50,7 +50,7 @@ class _FilterPageState extends State<FilterPage> {
), ),
Container( Container(
padding: EdgeInsets.only(left:10,right:10,top:30,bottom:10), padding: EdgeInsets.only(left:10.w,right:10.w,top:30.w,bottom:10.w),
color: Colors.white, color: Colors.white,
// margin: const EdgeInsets.symmetric(horizontal: 15), // margin: const EdgeInsets.symmetric(horizontal: 15),
child: Row( child: Row(
...@@ -61,17 +61,17 @@ class _FilterPageState extends State<FilterPage> { ...@@ -61,17 +61,17 @@ class _FilterPageState extends State<FilterPage> {
onTap: widget.resetTap, onTap: widget.resetTap,
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
height: 35, height: 35.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.5), borderRadius: BorderRadius.circular(17.5.w),
border:Border.all( border:Border.all(
width: 0.5, width: 0.5.w,
color: Colours.c9 color: Colours.c9
), ),
// color: Colours.cE0.withOpacity(0.5), // color: Colours.cE0.withOpacity(0.5),
), ),
// padding: EdgeInsets.symmetric(vertical: 8), // padding: EdgeInsets.symmetric(vertical: 8),
child: const Text('重置',style: TextStyle(fontSize: 13,color: Colours.c9,height: 1.5),), child: Text('重置',style: TextStyle(fontSize: 13.w,color: Colours.c9,height: 1.5),),
), ),
), ),
), ),
...@@ -81,13 +81,13 @@ class _FilterPageState extends State<FilterPage> { ...@@ -81,13 +81,13 @@ class _FilterPageState extends State<FilterPage> {
onTap: widget.sureTap, onTap: widget.sureTap,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.5), borderRadius: BorderRadius.circular(17.5.w),
color: AppTheme.primary.withOpacity(0.1) color: AppTheme.primary.withOpacity(0.1)
), ),
height: 35, height: 35.w,
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8), padding: EdgeInsets.symmetric(vertical: 8.w),
child: const Text('确定',style: TextStyle(fontSize: 13,color: AppTheme.primary,height: 1.5),), child: Text('确定',style: TextStyle(fontSize: 13.w,color: AppTheme.primary,height: 1.5),),
), ),
), ),
) )
......
...@@ -11,29 +11,29 @@ class BuildLabelWidget extends StatelessWidget { ...@@ -11,29 +11,29 @@ class BuildLabelWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10), margin: EdgeInsets.only(left: 10.w),
color: Colors.transparent, color: Colors.transparent,
width: 65, width: 65.w,
padding: const EdgeInsets.only(top: 10,bottom: 10), padding: EdgeInsets.only(top: 10.w,bottom: 10.w),
child: Container( child: Container(
// padding: EdgeInsets.all(8), // padding: EdgeInsets.all(8),
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.only(left: 8,right:8 ), padding: EdgeInsets.only(left: 8.w,right:8.w ),
height: 23, height: 23.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(12.5)), borderRadius: BorderRadius.all(Radius.circular(12.5.w)),
border:model.selected? Border.all(color:AppTheme.primary,width: 0.5,style: BorderStyle.solid):null, border:model.selected? Border.all(color:AppTheme.primary,width: 0.5.w,style: BorderStyle.solid):null,
color: Colors.white, color: Colors.white,
boxShadow: model.selected?[ boxShadow: model.selected?[
BoxShadow( BoxShadow(
color: AppTheme.primary.withOpacity(0.3), color: AppTheme.primary.withOpacity(0.3),
offset: const Offset(0, 1), offset: Offset(0, 1.w),
blurRadius: 2.w, blurRadius: 2.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
]:null, ]:null,
), ),
child: Text(model.name??'',style: TextStyle(fontSize: 13,height: 1.5,color: model.selected?AppTheme.primary:Colours.c9,fontWeight: Fonts.medium),) child: Text(model.name??'',style: TextStyle(fontSize: 13.w,height: 1.5,color: model.selected?AppTheme.primary:Colours.c9,fontWeight: Fonts.medium),)
), ),
); );
} }
......
...@@ -33,14 +33,16 @@ class _LoginPageState extends State<LoginPage> { ...@@ -33,14 +33,16 @@ class _LoginPageState extends State<LoginPage> {
children: [ children: [
Image.asset( Image.asset(
'assets/images/login_bg.png', 'assets/images/login_bg.png',
fit: BoxFit.contain,
width: double.infinity,
), ),
SafeArea( SafeArea(
top: false, top: false,
minimum: EdgeInsets.all(AppTheme.margin).copyWith( minimum: EdgeInsets.all(AppTheme.margin).copyWith(
// top:Screen.statusBar, // top:Screen.statusBar,
left: 25, left: 25.w,
right: 25, right: 25.w,
bottom: 25 bottom: 25.w
), ),
child: Column( child: Column(
children: [ children: [
...@@ -61,16 +63,16 @@ class _LoginPageState extends State<LoginPage> { ...@@ -61,16 +63,16 @@ class _LoginPageState extends State<LoginPage> {
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
const SizedBox(height: 120,), SizedBox(height: 120.w,),
Container( Container(
width: 180, width: 180.w,
height: 50, height: 50.w,
// color: Colors.cyan, // color: Colors.cyan,
child: Image.asset( child: Image.asset(
'assets/images/zijing_icon.png', 'assets/images/zijing_icon.png',
), ),
), ),
const SizedBox(height:66), SizedBox(height:66.w),
// //
CustomFormInput( CustomFormInput(
// label: 'Phone', // label: 'Phone',
...@@ -112,16 +114,16 @@ class _LoginPageState extends State<LoginPage> { ...@@ -112,16 +114,16 @@ class _LoginPageState extends State<LoginPage> {
controller: controller.codeInput, controller: controller.codeInput,
), ),
Positioned( Positioned(
right: 10, right: 10.w,
child: Row( child: Row(
children: [ children: [
Container(height: 20,width: 1,color: const Color(0xFFEBEBEB),), Container(height: 20.w,width: 1,color: const Color(0xFFEBEBEB),),
Gaps.hGaps10, Gaps.hGaps10,
GestureDetector( GestureDetector(
child: Container( child: Container(
padding: const EdgeInsets.symmetric(vertical: 10), padding: EdgeInsets.symmetric(vertical: 10.w),
// color: Colors.yellow, // color: Colors.yellow,
child: Text(controller.isCounting?'${controller.countDown}':'获取验证码',style: const TextStyle(fontSize: 11,color: AppTheme.primary,height: 1.4),)), child: Text(controller.isCounting?'${controller.countDown}':'获取验证码',style: TextStyle(fontSize: 11.w,color: AppTheme.primary,height: 1.4),)),
onTap: (){ onTap: (){
if (controller.isCounting == false){ if (controller.isCounting == false){
controller.sendCode(); controller.sendCode();
...@@ -134,32 +136,32 @@ class _LoginPageState extends State<LoginPage> { ...@@ -134,32 +136,32 @@ class _LoginPageState extends State<LoginPage> {
], ],
), ),
Container( Container(
margin: const EdgeInsets.only(left: 10,right: 10,top: 8.5), margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 8.5.w),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
controller.loginType == 0? GestureDetector( controller.loginType == 0? GestureDetector(
child: const Text('验证码登录',style: TextStyle(fontSize: 13,height: 1.3,color: Colours.c6),), child: Text('验证码登录',style: TextStyle(fontSize: 13.w,height: 1.3,color: Colours.c6),),
onTap: (){ onTap: (){
controller.updateLoginType(1); controller.updateLoginType(1);
}, },
):GestureDetector( ):GestureDetector(
child: const Text('密码登录',style: TextStyle(fontSize: 13,height: 1.3,color: Colours.c6),), child: Text('密码登录',style: TextStyle(fontSize: 13.w,height: 1.3,color: Colours.c6),),
onTap: (){ onTap: (){
controller.updateLoginType(0); controller.updateLoginType(0);
}, },
), ),
controller.loginType == 0? GestureDetector( controller.loginType == 0? GestureDetector(
child: const Text('忘记密码',style: TextStyle(fontSize: 13,height: 1.3,color: Colours.cBlue),), child: Text('忘记密码',style: TextStyle(fontSize: 13.w,height: 1.3,color: Colours.cBlue),),
onTap: (){ onTap: (){
context.pushNamed(Routes.forgetPwd); context.pushNamed(Routes.forgetPwd);
}, },
):const Text('*登录后将自动完成注册',style: TextStyle(fontSize: 13,height: 1.3,color: Colours.c6),), ): Text('*登录后将自动完成注册',style: TextStyle(fontSize: 13.w,height: 1.3,color: Colours.c6),),
], ],
) )
), ),
const SizedBox(height: 30,), SizedBox(height: 30.w,),
CustomGradientButton( CustomGradientButton(
text: '立即登录', text: '立即登录',
isEnabled: controller.enable, isEnabled: controller.enable,
...@@ -196,18 +198,18 @@ class _LoginPageState extends State<LoginPage> { ...@@ -196,18 +198,18 @@ class _LoginPageState extends State<LoginPage> {
), ),
), ),
Gaps.hGaps5, Gaps.hGaps5,
const Text('我已阅读并同意',style: TextStyle(color: Colours.c9,fontSize:10)), Text('我已阅读并同意',style: TextStyle(color: Colours.c9,fontSize:10.w)),
], ],
), ),
), ),
GestureDetector( GestureDetector(
child: const Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:10)), child: Text('《用户协议》',style: TextStyle(color: Colours.cBlue,fontSize:10.w)),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms);
}, },
), ),
GestureDetector( GestureDetector(
child: const Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:10)), child: Text('《隐私政策》',style: TextStyle(color: Colours.cBlue,fontSize:10.w)),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms);
}, },
......
...@@ -20,47 +20,47 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> { ...@@ -20,47 +20,47 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> {
body: Column( body: Column(
children: [ children: [
Container( Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
// 图书容器 // 图书容器
Container( Container(
color: Colours.cF8, color: Colours.cF8,
padding: EdgeInsets.symmetric(horizontal: 11,vertical: 12), padding: EdgeInsets.symmetric(horizontal: 11.w,vertical: 12.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 71, width: 71.w,
height: 86, height: 86.w,
color: Colors.cyan, color: Colors.cyan,
), ),
Gaps.hGaps10, Gaps.hGaps10,
Text('一想到还有95%的问题留给人类,我就放',style: TextStyle(fontSize: 13,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),maxLines: 2,overflow: TextOverflow.ellipsis,) Text('一想到还有95%的问题留给人类,我就放',style: TextStyle(fontSize: 13.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),maxLines: 2,overflow: TextOverflow.ellipsis,)
], ],
), ),
), ),
// 评价容器 // 评价容器
Container( Container(
padding: const EdgeInsets.symmetric(vertical: 15), padding: EdgeInsets.symmetric(vertical: 15.w),
width: double.infinity, width: double.infinity,
height: 160, height: 160.w,
color: Colors.white, color: Colors.white,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -69,7 +69,7 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> { ...@@ -69,7 +69,7 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
padding: const EdgeInsets.only(left: 10), padding: EdgeInsets.only(left: 10.w),
child: const Text('评分'), child: const Text('评分'),
), ),
Gaps.hGaps20, Gaps.hGaps20,
...@@ -78,11 +78,11 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> { ...@@ -78,11 +78,11 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> {
child: CustomRating( child: CustomRating(
max: 5, max: 5,
score:0 , score:0 ,
star: const Star( star: Star(
fat: 0.5, fat: 0.5,
progress: 7, progress: 7,
fillColor: AppTheme.primary, fillColor: AppTheme.primary,
size: 16, size: 16.w,
emptyColor: Colours.cE2, emptyColor: Colours.cE2,
), onRating: (double ) {}, ), onRating: (double ) {},
), ),
...@@ -91,14 +91,14 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> { ...@@ -91,14 +91,14 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> {
), ),
Container( Container(
// color: Colors.red, // color: Colors.red,
child: const CustomInput( child: CustomInput(
decoration: InputDecoration( decoration: InputDecoration(
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
border: InputBorder.none, border: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
errorBorder: InputBorder.none, errorBorder: InputBorder.none,
fillColor:Colors.white, fillColor:Colors.white,
hintStyle: TextStyle(fontSize: 14,height: 1.5,color: Colours.c6) hintStyle: TextStyle(fontSize: 14.w,height: 1.5,color: Colours.c6)
), ),
maxLines: 5, maxLines: 5,
hintText: '请简要描述', hintText: '请简要描述',
...@@ -113,9 +113,9 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> { ...@@ -113,9 +113,9 @@ class _OrderEvaluatePageState extends State<OrderEvaluatePage> {
), ),
), ),
), ),
const SizedBox(height: 50,), SizedBox(height: 50.w,),
Container( Container(
margin: const EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10.w),
child: CustomGradientButton( child: CustomGradientButton(
text: '提交评价', text: '提交评价',
isEnabled: false, isEnabled: false,
......
...@@ -3,6 +3,7 @@ library pay_coupon; ...@@ -3,6 +3,7 @@ library pay_coupon;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/pages/user_coupon/index.dart'; import 'package:flutter_book/pages/user_coupon/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../theme.dart'; import '../../theme.dart';
......
...@@ -24,9 +24,9 @@ class _PayCouponPageState extends State<PayCouponPage> { ...@@ -24,9 +24,9 @@ class _PayCouponPageState extends State<PayCouponPage> {
TabBar( TabBar(
labelColor: AppTheme.primary, labelColor: AppTheme.primary,
// isScrollable: true, // isScrollable: true,
labelStyle: const TextStyle(fontSize: 15,height: 1.4,fontWeight: Fonts.medium), labelStyle: TextStyle(fontSize: 15.w,height: 1.4,fontWeight: Fonts.medium),
unselectedLabelColor: Colours.c9, unselectedLabelColor: Colours.c9,
unselectedLabelStyle: const TextStyle(fontSize: 15,height: 1.4), unselectedLabelStyle: TextStyle(fontSize: 15.w,height: 1.4),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: AppTheme.primary, indicatorColor: AppTheme.primary,
tabs:controller.tabs, tabs:controller.tabs,
......
...@@ -4,6 +4,7 @@ library record; ...@@ -4,6 +4,7 @@ library record;
import 'dart:io'; import 'dart:io';
import 'package:audio_session/audio_session.dart'; import 'package:audio_session/audio_session.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_sound/flutter_sound.dart'; import 'package:flutter_sound/flutter_sound.dart';
import 'package:flutter_sound/public/flutter_sound_player.dart'; import 'package:flutter_sound/public/flutter_sound_player.dart';
import 'package:flutter_sound/public/flutter_sound_recorder.dart'; import 'package:flutter_sound/public/flutter_sound_recorder.dart';
......
...@@ -42,9 +42,9 @@ class _RecordPageState extends State<RecordPage> { ...@@ -42,9 +42,9 @@ class _RecordPageState extends State<RecordPage> {
body: Column( body: Column(
children: [ children: [
Container( Container(
margin: const EdgeInsets.all(3), margin: EdgeInsets.all(3.w),
padding: const EdgeInsets.all(3), padding: EdgeInsets.all(3.w),
height: 80, height: 80.w,
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -61,15 +61,15 @@ class _RecordPageState extends State<RecordPage> { ...@@ -61,15 +61,15 @@ class _RecordPageState extends State<RecordPage> {
child: Text(_mRecorder!.isRecording?'stop':'Record') child: Text(_mRecorder!.isRecording?'stop':'Record')
), ),
SizedBox( SizedBox(
width: 20, width: 20.w,
), ),
Text(_mRecorder!.isRecording? 'Recording in progress' : 'Record is stopped') Text(_mRecorder!.isRecording? 'Recording in progress' : 'Record is stopped')
], ],
), ),
), ),
Container( Container(
margin: const EdgeInsets.all(3), margin: EdgeInsets.all(3.w),
padding: const EdgeInsets.all(3), padding: EdgeInsets.all(3.w),
height: 80, height: 80,
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
......
library reset_pwd; library reset_pwd;
import 'package:flutter_book/utils/index.dart'; import 'package:flutter_book/utils/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
......
...@@ -25,7 +25,7 @@ class _ResetPwdPageState extends State<ResetPwdPage> { ...@@ -25,7 +25,7 @@ class _ResetPwdPageState extends State<ResetPwdPage> {
title: const Text('重置密码'), title: const Text('重置密码'),
), ),
body: Container( body: Container(
margin: const EdgeInsets.only(left: 10,top: 15,right: 10), margin: EdgeInsets.only(left: 10.w,top: 15.w,right: 10.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -67,8 +67,8 @@ class _ResetPwdPageState extends State<ResetPwdPage> { ...@@ -67,8 +67,8 @@ class _ResetPwdPageState extends State<ResetPwdPage> {
), ),
), ),
Container( Container(
margin: const EdgeInsets.only(left: 5,top: 5), margin: EdgeInsets.only(left: 5.w,top: 5.w),
child: const Text('密码必须是6-20个英文字母、数字或符号',style: TextStyle(fontSize: 10,color: Colours.c9),), child: Text('密码必须是6-20个英文字母、数字或符号',style: TextStyle(fontSize: 10.w,color: Colours.c9),),
), ),
Gaps.vGaps40, Gaps.vGaps40,
CustomGradientButton( CustomGradientButton(
......
...@@ -3,6 +3,7 @@ library search; ...@@ -3,6 +3,7 @@ library search;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/widgets/index.dart'; import 'package:flutter_book/widgets/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart'; import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
......
...@@ -36,8 +36,8 @@ class _SearchPageState extends State<SearchPage> { ...@@ -36,8 +36,8 @@ class _SearchPageState extends State<SearchPage> {
context.pop(); context.pop();
}, },
child: Container( child: Container(
padding: const EdgeInsets.only(left: 10,top: 10,bottom: 10), padding: EdgeInsets.only(left: 10.w,top: 10.w,bottom: 10.w),
child: const Text('取消',style: TextStyle(fontSize: 14,height: 1.5,color: Colours.c3),), child: Text('取消',style: TextStyle(fontSize: 14.w,height: 1.5,color: Colours.c3),),
// color: Colors.red, // color: Colors.red,
), ),
) )
......
...@@ -17,20 +17,20 @@ class _BuildHistoryState extends State<BuildHistory> { ...@@ -17,20 +17,20 @@ class _BuildHistoryState extends State<BuildHistory> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 13,top: 18), margin: EdgeInsets.only(left: 13.w,top: 18.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
const Text('搜索历史',style: TextStyle(fontSize: 14,height: 1.5,color: Colours.c3,fontWeight: Fonts.medium),), Text('搜索历史',style: TextStyle(fontSize: 14.w,height: 1.5,color: Colours.c3,fontWeight: Fonts.medium),),
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
widget.controller.clear(); widget.controller.clear();
}, },
child: Container( child: Container(
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10.w),
// width: 10, // width: 10,
// height: 10, // height: 10,
// color: Colors.cyan, // color: Colors.cyan,
...@@ -42,8 +42,8 @@ class _BuildHistoryState extends State<BuildHistory> { ...@@ -42,8 +42,8 @@ class _BuildHistoryState extends State<BuildHistory> {
], ],
), ),
Wrap( Wrap(
spacing: 10, spacing: 10.w,
runSpacing: 10, runSpacing: 10.w,
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
runAlignment: WrapAlignment.start, runAlignment: WrapAlignment.start,
children: _buildItem(widget.controller.records), children: _buildItem(widget.controller.records),
......
...@@ -19,7 +19,7 @@ class HomeCard extends StatelessWidget { ...@@ -19,7 +19,7 @@ class HomeCard extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Container(
height: 40, height: 40.w,
color: Colors.red, color: Colors.red,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -28,10 +28,10 @@ class HomeCard extends StatelessWidget { ...@@ -28,10 +28,10 @@ class HomeCard extends StatelessWidget {
Row( Row(
children: [ children: [
const Text('查看全部'), const Text('查看全部'),
SizedBox(width: 10,), SizedBox(width: 10.w,),
Container( Container(
height: 10, height: 10.w,
width: 4, width: 4.w,
color: Colors.cyan, color: Colors.cyan,
) )
], ],
...@@ -40,27 +40,27 @@ class HomeCard extends StatelessWidget { ...@@ -40,27 +40,27 @@ class HomeCard extends StatelessWidget {
), ),
), ),
Container( Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
color: Colors.blueAccent, color: Colors.blueAccent,
// color: Colors.cyan, // color: Colors.cyan,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
height: 160, height: 160.w,
width: 100, width: 100.w,
color: Colors.cyan, color: Colors.cyan,
), ),
Expanded( Expanded(
child: Container( child: Container(
color: Colors.red, color: Colors.red,
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
child: const Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start, // mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text('名称',textAlign: TextAlign.start,), Text('名称',textAlign: TextAlign.start,),
SizedBox(height: 20,), SizedBox(height: 20.w,),
Text( Text(
'描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述', '描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述',
maxLines: 3, maxLines: 3,
......
...@@ -3,5 +3,6 @@ library study; ...@@ -3,5 +3,6 @@ library study;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
part 'home_card.dart'; part 'home_card.dart';
\ No newline at end of file
...@@ -5,6 +5,7 @@ library study_history; ...@@ -5,6 +5,7 @@ library study_history;
import 'package:easy_refresh/easy_refresh.dart'; import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/apis/index.dart'; import 'package:flutter_book/apis/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../models/index.dart'; import '../../models/index.dart';
......
...@@ -10,14 +10,14 @@ class BuildDayItem extends StatelessWidget { ...@@ -10,14 +10,14 @@ class BuildDayItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10,top: 10,right: 10), margin: EdgeInsets.only(left: 10.w,top: 10.w,right: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(1, 3), offset: Offset(1, 3.w),
blurRadius: 10, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
...@@ -27,17 +27,17 @@ class BuildDayItem extends StatelessWidget { ...@@ -27,17 +27,17 @@ class BuildDayItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: const EdgeInsets.only(left: 10), margin: EdgeInsets.only(left: 10.w),
decoration: const BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(8.0), topLeft: Radius.circular(8.0.w),
topRight: Radius.circular(8.0), topRight: Radius.circular(8.0.w),
), ),
// color: Colors.cyan, // color: Colors.cyan,
), ),
height: 32, height: 32.w,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text(historyModel.time??'',style: const TextStyle(fontSize: 13,height: 1.4,color: Colours.c6),), child: Text(historyModel.time??'',style: TextStyle(fontSize: 13.w,height: 1.4,color: Colours.c6),),
), ),
ListView.builder( ListView.builder(
shrinkWrap: true, shrinkWrap: true,
...@@ -54,28 +54,28 @@ class BuildDayItem extends StatelessWidget { ...@@ -54,28 +54,28 @@ class BuildDayItem extends StatelessWidget {
Widget _buildItem(CourseModel courseModel){ Widget _buildItem(CourseModel courseModel){
return Container( return Container(
margin: const EdgeInsets.only(left: 10,right: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w),
child: Column( child: Column(
children: [ children: [
Container( Container(
color: Colours.cF0, color: Colours.cF0,
height: 0.5, height: 0.5.w,
), ),
Container( Container(
margin: const EdgeInsets.only(top: 11.5,bottom: 14.5), margin: EdgeInsets.only(top: 11.5.w,bottom: 14.5.w),
// color: Colors.yellow, // color: Colors.yellow,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: courseModel.img??'', url: courseModel.img??'',
), ),
Expanded( Expanded(
child: Container( child: Container(
// color: Colors.green, // color: Colors.green,
padding: const EdgeInsets.only(top: 2.5,left: 13), 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,
...@@ -83,9 +83,9 @@ class BuildDayItem extends StatelessWidget { ...@@ -83,9 +83,9 @@ class BuildDayItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(courseModel.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),maxLines: 1,overflow: TextOverflow.ellipsis,), Text(courseModel.bookName??'',style: TextStyle(fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),maxLines: 1,overflow: TextOverflow.ellipsis,),
Gaps.vGaps5, Gaps.vGaps5,
Text(courseModel.authors??'',style: const TextStyle(fontSize: 12,height: 1.4,color: Colours.c6),), Text(courseModel.authors??'',style: TextStyle(fontSize: 12.w,height: 1.4,color: Colours.c6),),
], ],
), ),
Gaps.vGaps25, Gaps.vGaps25,
...@@ -94,11 +94,11 @@ class BuildDayItem extends StatelessWidget { ...@@ -94,11 +94,11 @@ class BuildDayItem extends StatelessWidget {
children: [ children: [
Container( Container(
color: AppTheme.primary.withOpacity(0.1), color: AppTheme.primary.withOpacity(0.1),
padding: const EdgeInsets.symmetric(horizontal: 3.5), padding: EdgeInsets.symmetric(horizontal: 3.5.w),
child: Text(courseModel.typeName,style: const TextStyle(fontSize: 11,height: 1.3,color:AppTheme.primary),), child: Text(courseModel.typeName,style: TextStyle(fontSize: 11.w,height: 1.3,color:AppTheme.primary),),
), ),
// Spacer(), // Spacer(),
Text('上次读到:${courseModel.lastChapter}',style: const TextStyle(fontSize: 11,height: 1.3,color: Colours.c6),) Text('上次读到:${courseModel.lastChapter}',style: TextStyle(fontSize: 11.w,height: 1.3,color: Colours.c6),)
], ],
) )
], ],
......
...@@ -18,7 +18,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -18,7 +18,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
title: const Text('学习报告'), title: const Text('学习报告'),
), ),
body: Container( body: Container(
margin: EdgeInsets.only(left: 10,top: 10,bottom: 10,right: 10), margin: EdgeInsets.only(left: 10.w,top: 10.w,bottom: 10.w,right: 10.w),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
...@@ -38,31 +38,31 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -38,31 +38,31 @@ class _StudyReportPageState extends State<StudyReportPage> {
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: EdgeInsets.only(left: 15,top: 15,bottom: 15), padding: EdgeInsets.only(left: 15.w,top: 15.w,bottom: 15.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.yellow, color: Colors.yellow,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(1, 3), offset: Offset(1, 3.w),
blurRadius: 10, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
), ),
height: 220, height: 220.w,
child: Column( child: Column(
children: [ children: [
Row( Row(
children: [ children: [
Container( Container(
width: 26, width: 26.w,
height: 26, height: 26.w,
color: Colors.cyan, color: Colors.cyan,
), ),
Gaps.hGaps10, Gaps.hGaps10,
Text('笔记',style: TextStyle(fontSize: 16,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),) Text('笔记',style: TextStyle(fontSize: 16.w,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),)
], ],
) )
...@@ -71,31 +71,31 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -71,31 +71,31 @@ class _StudyReportPageState extends State<StudyReportPage> {
), ),
Gaps.vGaps10, Gaps.vGaps10,
Container( Container(
padding: EdgeInsets.only(left: 15,top: 15,bottom: 15), padding: EdgeInsets.only(left: 15.w,top: 15.w,bottom: 15.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.red, color: Colors.red,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(1, 3), offset: Offset(1, 3.w),
blurRadius: 10, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
), ),
height: 110, height: 110.w,
child: Column( child: Column(
children: [ children: [
Row( Row(
children: [ children: [
Container( Container(
width: 26, width: 26.w,
height: 26, height: 26.w,
color: Colors.cyan, color: Colors.cyan,
), ),
Gaps.hGaps10, Gaps.hGaps10,
Text('距离连续学习',style: TextStyle(fontSize: 16,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),) Text('距离连续学习',style: TextStyle(fontSize: 16.w,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),)
], ],
) )
...@@ -111,16 +111,16 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -111,16 +111,16 @@ class _StudyReportPageState extends State<StudyReportPage> {
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: EdgeInsets.only(left: 15,top: 15,bottom: 15), padding: EdgeInsets.only(left: 15.w,top: 15.w,bottom: 15.w),
height: 165, height: 165,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.cyan, color: Colors.cyan,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(1, 3), offset: Offset(1, 3.w),
blurRadius: 10, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
...@@ -130,12 +130,12 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -130,12 +130,12 @@ class _StudyReportPageState extends State<StudyReportPage> {
Row( Row(
children: [ children: [
Container( Container(
width: 26, width: 26.w,
height: 26, height: 26.w,
color: Colors.cyan, color: Colors.cyan,
), ),
Gaps.hGaps10, Gaps.hGaps10,
Text('知识测评',style: TextStyle(fontSize: 16,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),) Text('知识测评',style: TextStyle(fontSize: 16.w,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),)
], ],
) )
...@@ -144,31 +144,31 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -144,31 +144,31 @@ class _StudyReportPageState extends State<StudyReportPage> {
), ),
Gaps.vGaps10, Gaps.vGaps10,
Container( Container(
padding: EdgeInsets.only(left: 15,top: 15,bottom: 15), padding: EdgeInsets.only(left: 15.w,top: 15.w,bottom: 15.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.green, color: Colors.green,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
offset: const Offset(1, 3), offset: Offset(1, 3.w),
blurRadius: 10, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
), ),
height: 165, height: 165.w,
child: Column( child: Column(
children: [ children: [
Row( Row(
children: [ children: [
Container( Container(
width: 26, width: 26.w,
height: 26, height: 26.w,
color: Colors.cyan, color: Colors.cyan,
), ),
Gaps.hGaps10, Gaps.hGaps10,
Text('讨论',style: TextStyle(fontSize: 16,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),) Text('讨论',style: TextStyle(fontSize: 16.w,height: 1.3,color: Colours.c3,fontWeight: Fonts.medium),)
], ],
) )
......
...@@ -17,7 +17,7 @@ class BuildCard extends StatelessWidget { ...@@ -17,7 +17,7 @@ class BuildCard extends StatelessWidget {
top: 0, top: 0,
right: 0, right: 0,
child: Container( child: Container(
padding: const EdgeInsets.only(left: 17.5,top:25,right: 20,bottom: 20), padding: EdgeInsets.only(left: 17.5.w,top:25.w,right: 20.w,bottom: 20.w),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
...@@ -52,8 +52,8 @@ class BuildCard extends StatelessWidget { ...@@ -52,8 +52,8 @@ class BuildCard extends StatelessWidget {
), ),
), ),
Container( Container(
height: 120, height: 120.w,
width: 100, width: 100.w,
color: Colors.lime, color: Colors.lime,
) )
], ],
......
...@@ -3,6 +3,7 @@ library about; ...@@ -3,6 +3,7 @@ library about;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/utils/index.dart'; import 'package:flutter_book/utils/index.dart';
import 'package:flutter_book/widgets/index.dart'; import 'package:flutter_book/widgets/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
......
...@@ -37,16 +37,16 @@ class _AboutPageState extends State<AboutPage> { ...@@ -37,16 +37,16 @@ class _AboutPageState extends State<AboutPage> {
Column( Column(
children: [ children: [
Container( Container(
margin: const EdgeInsets.only(top: 55), margin: EdgeInsets.only(top: 55.w),
height: 60, height: 60.w,
width: 60, width: 60.w,
color: Colors.cyan, color: Colors.cyan,
child: const CustomImage.asset(url: 'assets/images/banner.png'), child: const CustomImage.asset(url: 'assets/images/banner.png'),
), ),
Gaps.vGaps15, Gaps.vGaps15,
const Text('紫荆数智学堂',style: TextStyle(fontSize: 17,fontWeight: Fonts.medium,color: Colours.c3),), Text('紫荆数智学堂',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: Colours.c3),),
Gaps.vGaps5, Gaps.vGaps5,
Text('V${packageInfo.version??''}',style: const TextStyle(fontSize: 13,color: Colours.c9)), Text('V${packageInfo.version??''}',style: TextStyle(fontSize: 13.w,color: Colours.c9)),
], ],
), ),
SafeArea( SafeArea(
...@@ -56,16 +56,16 @@ class _AboutPageState extends State<AboutPage> { ...@@ -56,16 +56,16 @@ class _AboutPageState extends State<AboutPage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
GestureDetector( GestureDetector(
child: const Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10,color: Color(0xFF2A82D9)),), child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9)),),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms);
}, },
), ),
Gaps.vGaps15, Gaps.vGaps15,
Container(width: 1,height: 10,color: const Color(0xFFC8C8C8),), Container(width: 1.w,height: 10.w,color: const Color(0xFFC8C8C8),),
Gaps.vGaps15, Gaps.vGaps15,
GestureDetector( GestureDetector(
child: const Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10,color: Color(0xFF2A82D9))), child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9))),
onTap:(){ onTap:(){
context.pushNamed(Routes.terms); context.pushNamed(Routes.terms);
} , } ,
...@@ -73,7 +73,7 @@ class _AboutPageState extends State<AboutPage> { ...@@ -73,7 +73,7 @@ class _AboutPageState extends State<AboutPage> {
], ],
), ),
Gaps.hGaps10, Gaps.hGaps10,
const Text('Copyright © 2024 Zijing Education. All rights reserved.\n清控紫荆(北京)教育科技股份有限公司京\nICP证150431号',style: TextStyle(color: Colours.c9,fontSize:9),textAlign: TextAlign.center,), Text('Copyright © 2024 Zijing Education. All rights reserved.\n清控紫荆(北京)教育科技股份有限公司京\nICP证150431号',style: TextStyle(color: Colours.c9,fontSize:9.w),textAlign: TextAlign.center,),
Gaps.vGaps25, Gaps.vGaps25,
], ],
), ),
......
...@@ -22,12 +22,12 @@ class _UserCoinPageState extends State<UserCoinPage> { ...@@ -22,12 +22,12 @@ class _UserCoinPageState extends State<UserCoinPage> {
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return Container( return Container(
height: 200, height: 200.w,
color: Colors.white, color: Colors.white,
child: const Center( child: Center(
child: Text( child: Text(
'This is the bottom sheet content', 'This is the bottom sheet content',
style: TextStyle(fontSize: 18), style: TextStyle(fontSize: 18.w),
), ),
), ),
); );
...@@ -36,7 +36,7 @@ class _UserCoinPageState extends State<UserCoinPage> { ...@@ -36,7 +36,7 @@ class _UserCoinPageState extends State<UserCoinPage> {
print('================================================================'); print('================================================================');
}); });
}, },
child: const Text('充值',style: TextStyle(color: Colours.c3,fontSize: 14,height: 1.5,fontWeight: Fonts.medium),) child: Text('充值',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium),)
) )
], ],
), ),
...@@ -45,14 +45,14 @@ class _UserCoinPageState extends State<UserCoinPage> { ...@@ -45,14 +45,14 @@ class _UserCoinPageState extends State<UserCoinPage> {
onRefresh: controller.onRefresh, onRefresh: controller.onRefresh,
onLoading: controller.onLoading, onLoading: controller.onLoading,
child: Container( child: Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
......
...@@ -14,7 +14,7 @@ class BuildCell extends StatelessWidget { ...@@ -14,7 +14,7 @@ class BuildCell extends StatelessWidget {
children: [ children: [
Container( Container(
// color: Colors.green, // color: Colors.green,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
...@@ -22,10 +22,10 @@ class BuildCell extends StatelessWidget { ...@@ -22,10 +22,10 @@ class BuildCell extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Container( Container(
width: 27, width: 27.w,
height: 27, height: 27.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(13.5), borderRadius: BorderRadius.circular(13.5.w),
color: Colors.cyan, color: Colors.cyan,
), ),
), ),
...@@ -34,19 +34,19 @@ class BuildCell extends StatelessWidget { ...@@ -34,19 +34,19 @@ class BuildCell extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Gaps.vGaps15, Gaps.vGaps15,
Text(model.remarks??'',style: const TextStyle(color: Colours.c3,fontSize: 14,height: 1.6,fontWeight: Fonts.medium),), Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),),
Text(model.createTime??'',style:const TextStyle(color: Colours.c9,fontSize: 10,height: 1.6,)), Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)),
Gaps.vGaps15, Gaps.vGaps15,
], ],
) )
], ],
), ),
), ),
Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: const TextStyle(fontSize: 17,fontWeight: Fonts.medium,color: AppTheme.primary),) Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: AppTheme.primary),)
], ],
), ),
), ),
Container(color: Colours.cLine,margin: const EdgeInsets.symmetric(horizontal: 15),height: 1,), Container(color: Colours.cLine,margin: EdgeInsets.symmetric(horizontal: 15.w),height: 1,),
], ],
); );
} }
......
...@@ -30,7 +30,7 @@ class _UserCouponPageState extends State<UserCouponPage> { ...@@ -30,7 +30,7 @@ class _UserCouponPageState extends State<UserCouponPage> {
controller.getOverCoupons(); controller.getOverCoupons();
}, },
child: Container( child: Container(
height: 40, height: 40.w,
color: Colors.cyan, color: Colors.cyan,
child: Text('过期优惠券'), child: Text('过期优惠券'),
), ),
......
...@@ -12,7 +12,7 @@ class BuildItem extends StatelessWidget { ...@@ -12,7 +12,7 @@ class BuildItem extends StatelessWidget {
return ColorFiltered( return ColorFiltered(
colorFilter: ColorFilter.mode(Colors.transparent, BlendMode.saturation), colorFilter: ColorFilter.mode(Colors.transparent, BlendMode.saturation),
child: Container( child: Container(
margin: EdgeInsets.only(left: 10,top: 10,right: 5), margin: EdgeInsets.only(left: 10.w,top: 10.w,right: 5.w),
child: Stack( child: Stack(
children: [ children: [
Container( Container(
...@@ -23,13 +23,13 @@ class BuildItem extends StatelessWidget { ...@@ -23,13 +23,13 @@ class BuildItem extends StatelessWidget {
) , ) ,
), ),
Container( Container(
height: 105, height: 105.w,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width:120 , width:120.w ,
height: 100, height: 100.w,
child: Column( child: Column(
children: [ children: [
RichText( RichText(
...@@ -37,23 +37,23 @@ class BuildItem extends StatelessWidget { ...@@ -37,23 +37,23 @@ class BuildItem extends StatelessWidget {
children: <TextSpan>[ children: <TextSpan>[
TextSpan( TextSpan(
text: '¥', text: '¥',
style: TextStyle(fontSize: 15,fontWeight: Fonts.boldSemi,height: 1.5,color: Colors.white) style: TextStyle(fontSize: 15.w,fontWeight: Fonts.boldSemi,height: 1.5,color: Colors.white)
), ),
TextSpan( TextSpan(
text: '5', text: '5',
style: TextStyle(fontSize: 40,fontWeight: Fonts.boldSemi,height: 1.5,color: Colors.white) style: TextStyle(fontSize: 40.w,fontWeight: Fonts.boldSemi,height: 1.5,color: Colors.white)
), ),
] ]
), ),
), ),
Text('满${model.normPrice}可用',style: TextStyle(fontSize: 11,height: 1.5,color: Colors.white),) Text('满${model.normPrice}可用',style: TextStyle(fontSize: 11.w,height: 1.5,color: Colors.white),)
], ],
), ),
// color: Colors.cyan, // color: Colors.cyan,
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(left:15,right: 15 ), margin: EdgeInsets.only(left:15.w,right: 15.w ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
...@@ -61,23 +61,23 @@ class BuildItem extends StatelessWidget { ...@@ -61,23 +61,23 @@ class BuildItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text(model.couponName??'',style: TextStyle(fontSize: 16,fontWeight: Fonts.medium,height: 1.5,color: Colours.c3),), Text(model.couponName??'',style: TextStyle(fontSize: 16.w,fontWeight: Fonts.medium,height: 1.5,color: Colours.c3),),
Gaps.vGaps5, Gaps.vGaps5,
Text('满${model.normPrice}${model.reducedPrice}元',style: TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text('满${model.normPrice}${model.reducedPrice}元',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
Gaps.vGaps5, Gaps.vGaps5,
Text(model.endTime??'',style: TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text(model.endTime??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
], ],
), ),
Container( Container(
width: 65, width: 65.w,
height: 24, height: 24.w,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15.w),
color: Colors.white, color: Colors.white,
border: Border.all(width: 1,color: AppTheme.primary) border: Border.all(width: 1.w,color: AppTheme.primary)
), ),
child: const Text('立即使用',style: TextStyle(fontSize: 12,fontWeight: Fonts.medium,color: AppTheme.primary),), child: Text('立即使用',style: TextStyle(fontSize: 12.w,fontWeight: Fonts.medium,color: AppTheme.primary),),
) )
], ],
), ),
......
...@@ -25,14 +25,14 @@ class _UserDiscussPageState extends State<UserDiscussPage> { ...@@ -25,14 +25,14 @@ class _UserDiscussPageState extends State<UserDiscussPage> {
onLoading: controller.onLoading, onLoading: controller.onLoading,
child:SingleChildScrollView( child:SingleChildScrollView(
child: Container( child: Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
......
...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget { ...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget {
return Container( return Container(
color: Colors.transparent, color: Colors.transparent,
// margin: const EdgeInsets.symmetric(horizontal: 10), // margin: const EdgeInsets.symmetric(horizontal: 10),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
// color: Colors.red, // color: Colors.red,
// margin: const EdgeInsets.all(10), // margin: const EdgeInsets.all(10),
// decoration: BoxDecoration( // decoration: BoxDecoration(
...@@ -35,36 +35,36 @@ class BuildItem extends StatelessWidget { ...@@ -35,36 +35,36 @@ class BuildItem extends StatelessWidget {
children: [ children: [
index == 0 ? Container( index == 0 ? Container(
// padding: const EdgeInsets.only(left: 10), // padding: const EdgeInsets.only(left: 10),
height: 32, height: 32.w,
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(8), topLeft: Radius.circular(8.w),
topRight: Radius.circular(8), topRight: Radius.circular(8.w),
), ),
color: Colors.white, color: Colors.white,
), ),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text('共$num本书',style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c6),), child: Text('共$num本书',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c6),),
):const SizedBox(), ):const SizedBox(),
Container( Container(
height: 0.5, height: 0.5.w,
color: Colours.cF0, color: Colours.cF0,
), ),
Container( Container(
padding: const EdgeInsets.only(top: 12,bottom: 15), padding: EdgeInsets.only(top: 12.w,bottom: 15.w),
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
), ),
Container( Container(
height: 87, height: 87.w,
margin: const EdgeInsets.only(left: 13), margin: EdgeInsets.only(left: 13.w),
// color: Colors.green, // color: Colors.green,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -73,11 +73,11 @@ class BuildItem extends StatelessWidget { ...@@ -73,11 +73,11 @@ class BuildItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.bookName??'',style: TextStyle(fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),), Text(model.authors??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c6),),
], ],
), ),
Text('${model.commentNum.toString()}个讨论',style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)), Text('${model.commentNum.toString()}个讨论',style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary)),
], ],
), ),
) )
......
...@@ -33,24 +33,24 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> { ...@@ -33,24 +33,24 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> {
children: [ children: [
BuildItem(model: widget.model), BuildItem(model: widget.model),
ClipRRect( ClipRRect(
borderRadius:const BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)), borderRadius:BorderRadius.only(topLeft: Radius.circular(5.w),topRight: Radius.circular(5)),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
color: Colors.white, color: Colors.white,
height: 35, height: 35.w,
child: TabBar( child: TabBar(
indicator: UnderlineTabIndicator( indicator: UnderlineTabIndicator(
borderRadius: BorderRadius.circular(0.75), borderRadius: BorderRadius.circular(0.75.w),
borderSide: const BorderSide(width: 1.5,color: AppTheme.primary), borderSide: BorderSide(width: 1.5.w,color: AppTheme.primary),
insets: const EdgeInsets.symmetric(horizontal: 22), // 设置标签下面指示器的水平内边距 insets: EdgeInsets.symmetric(horizontal: 22.w), // 设置标签下面指示器的水平内边距
), ),
labelPadding: const EdgeInsets.symmetric(horizontal: 20), labelPadding: EdgeInsets.symmetric(horizontal: 20.w),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: AppTheme.primary, indicatorColor: AppTheme.primary,
indicatorWeight: 1.5, indicatorWeight: 1.5,
labelStyle: const TextStyle(color: AppTheme.primary,fontSize: 15,height: 1.5,fontWeight: Fonts.medium), labelStyle: TextStyle(color: AppTheme.primary,fontSize: 15.w,height: 1.5,fontWeight: Fonts.medium),
unselectedLabelColor: Colours.c9, unselectedLabelColor: Colours.c9,
unselectedLabelStyle: const TextStyle(color: Colours.c9,fontSize: 15,height: 1.5), unselectedLabelStyle: TextStyle(color: Colours.c9,fontSize: 15.w,height: 1.5),
isScrollable: true, isScrollable: true,
tabs: tabs tabs: tabs
), ),
......
...@@ -10,15 +10,15 @@ class BuildDiscuss extends StatelessWidget { ...@@ -10,15 +10,15 @@ class BuildDiscuss extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10,right: 10,top: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 10.w),
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(1.5, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -29,14 +29,14 @@ class BuildDiscuss extends StatelessWidget { ...@@ -29,14 +29,14 @@ class BuildDiscuss extends StatelessWidget {
children: [ children: [
RichText(text: TextSpan( RichText(text: TextSpan(
children: [ children: [
const TextSpan(text: '话题:',style: TextStyle( TextSpan(text: '话题:',style: TextStyle(
fontSize: 14, fontSize: 14.w,
height: 1.5, height: 1.5.w,
color: Colours.c3, color: Colours.c3,
)), )),
TextSpan(text: model.title,style: const TextStyle( TextSpan(text: model.title,style: TextStyle(
fontSize: 14, fontSize: 14.w,
height: 1.5, height: 1.5.w,
color: Colours.c3, color: Colours.c3,
fontWeight: Fonts.medium fontWeight: Fonts.medium
)), )),
...@@ -44,24 +44,24 @@ class BuildDiscuss extends StatelessWidget { ...@@ -44,24 +44,24 @@ class BuildDiscuss extends StatelessWidget {
)), )),
Gaps.vGaps10, Gaps.vGaps10,
Container( Container(
height: 0.5, height: 0.5.w,
color: Colours.cF2, color: Colours.cF2,
), ),
_buildItem(model), _buildItem(model),
Container( Container(
margin:const EdgeInsets.only(left: 15), margin:EdgeInsets.only(left: 15.w),
child: _buildListView(model.commentAll != null ? model.commentAll!:[]) child: _buildListView(model.commentAll != null ? model.commentAll!:[])
), ),
Gaps.vGaps13, Gaps.vGaps13,
Container( Container(
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 5,horizontal: 10), padding: EdgeInsets.symmetric(vertical: 5.w,horizontal: 10.w),
color: Colours.cF8, color: Colours.cF8,
child:Column( child:Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.chapterName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text(model.chapterName??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
Text('内容:${model.quoteContent??''}',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text('内容:${model.quoteContent??''}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
], ],
) )
) )
...@@ -75,17 +75,17 @@ class BuildDiscuss extends StatelessWidget { ...@@ -75,17 +75,17 @@ class BuildDiscuss extends StatelessWidget {
return Row( return Row(
children: [ children: [
ClipRRect( ClipRRect(
borderRadius: BorderRadius.circular(17.5), borderRadius: BorderRadius.circular(17.5.w),
child: Container( child: Container(
width: 35, width: 35.w,
height: 35, height: 35.w,
color: Colors.red, color: Colors.red,
child: CustomImage.network(url: model.personPic??''), child: CustomImage.network(url: model.personPic??''),
), ),
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: const EdgeInsets.only(left: 10,top: 10), margin: EdgeInsets.only(left: 10.w,top: 10.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -94,39 +94,39 @@ class BuildDiscuss extends StatelessWidget { ...@@ -94,39 +94,39 @@ class BuildDiscuss extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
Text(model.personName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text(model.personName??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
Gaps.hGaps10, Gaps.hGaps10,
type ==0?const SizedBox():const Text('发起人',style: TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary),) type ==0?const SizedBox(): Text('发起人',style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),)
], ],
), ),
Text(model.createTime??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),) Text(model.createTime??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),)
], ],
), ),
Text(model.content??'',style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c3),), Text(model.content??'',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c3),),
Row( Row(
children: [ children: [
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
height: 15, height: 15.w,
width: 15, width: 15.w,
// color: Colors.green, // color: Colors.green,
child: Image.asset('assets/images/love.png'), child: Image.asset('assets/images/love.png'),
), ),
Text(model.goodNum.toString(),style: const TextStyle(fontSize:12,height: 1.5,color: Colours.c9)) Text(model.goodNum.toString(),style: TextStyle(fontSize:12.w,height: 1.5,color: Colours.c9))
], ],
), ),
Gaps.hGaps15, Gaps.hGaps15,
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 15, height: 15.w,
width: 15, width: 15.w,
// color: Colors.yellow, // color: Colors.yellow,
child: Image.asset('assets/images/discuss_big.png'), child: Image.asset('assets/images/discuss_big.png'),
), ),
Text(model.replyNum.toString(),style: const TextStyle(fontSize:12,height: 1.5,color: Colours.c9)) Text(model.replyNum.toString(),style: TextStyle(fontSize:12.w,height: 1.5,color: Colours.c9))
], ],
) )
], ],
......
...@@ -10,36 +10,36 @@ class BuildItem extends StatelessWidget { ...@@ -10,36 +10,36 @@ class BuildItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: const EdgeInsets.only(top: 12,bottom: 15), padding: EdgeInsets.only(top: 12.w,bottom: 15.w),
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
), ),
Container( Container(
height: 87, height: 87.w,
margin: const EdgeInsets.only(left: 13), margin: EdgeInsets.only(left: 13.w),
// color: Colors.green, // color: Colors.green,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -48,11 +48,11 @@ class BuildItem extends StatelessWidget { ...@@ -48,11 +48,11 @@ class BuildItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.bookName??'',style: TextStyle(fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),), Text(model.authors??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c6),),
], ],
), ),
Text('${model.commentNum.toString()}个讨论',style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)), Text('${model.commentNum.toString()}个讨论',style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary)),
], ],
), ),
) )
......
...@@ -2,6 +2,7 @@ library user_feedback; ...@@ -2,6 +2,7 @@ library user_feedback;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/utils/index.dart'; import 'package:flutter_book/utils/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../widgets/index.dart'; import '../../widgets/index.dart';
......
...@@ -17,7 +17,7 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> { ...@@ -17,7 +17,7 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> {
), ),
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.transparent, color: Colors.transparent,
), ),
child: Column( child: Column(
...@@ -25,22 +25,22 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> { ...@@ -25,22 +25,22 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> {
children: [ children: [
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: const EdgeInsets.only(left: 10, top: 16.5), padding: EdgeInsets.only(left: 10.w, top: 16.5.w),
child: const Text.rich(TextSpan(children: [ child: Text.rich(TextSpan(children: [
TextSpan( TextSpan(
text: "*", text: "*",
style: TextStyle(fontSize: 14, color: Colours.cAB1941)), style: TextStyle(fontSize: 14, color: Colours.cAB1941)),
TextSpan( TextSpan(
text: "问题描述或建议", text: "问题描述或建议",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.w,
color: Colours.c3, color: Colours.c3,
fontWeight: FontWeight.bold)), fontWeight: FontWeight.bold)),
])), ])),
), ),
Container( Container(
padding: const EdgeInsets.only( padding: EdgeInsets.only(
left: 10, right: 10, top: 6.5, bottom: 10), left: 10.w, right: 10.w, top: 6.5.w, bottom: 10.w),
child: const CustomInput( child: const CustomInput(
maxLines: 5, maxLines: 5,
...@@ -50,8 +50,8 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> { ...@@ -50,8 +50,8 @@ class _UserFeedbackPageState extends State<UserFeedbackPage> {
// _buildTextField(context), // _buildTextField(context),
Container( Container(
padding: const EdgeInsets.only( padding: EdgeInsets.only(
left: 10, right: 10, top: 35, bottom: 20), left: 10.w, right: 10.w, top: 35.w, bottom: 20.w),
width: double.infinity, width: double.infinity,
child: child:
CustomGradientButton( CustomGradientButton(
......
...@@ -36,19 +36,19 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -36,19 +36,19 @@ class _UserGenderPageState extends State<UserGenderPage> {
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: AppTheme.margin, vertical: AppTheme.margin), horizontal: AppTheme.margin, vertical: AppTheme.margin),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
...@@ -62,17 +62,17 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -62,17 +62,17 @@ class _UserGenderPageState extends State<UserGenderPage> {
}); });
}, },
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15), padding: EdgeInsets.only(left: 15.w, right: 15.w),
color: Colors.transparent, color: Colors.transparent,
height: 35, height: 35.w,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
const Text( Text(
"男", "男",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.w,
color: Colours.c3, color: Colours.c3,
), ),
), ),
...@@ -105,8 +105,8 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -105,8 +105,8 @@ class _UserGenderPageState extends State<UserGenderPage> {
), ),
Container( Container(
color: Colours.cLine, color: Colours.cLine,
margin: const EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10.w),
height: 1, height: 1.w,
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
...@@ -116,17 +116,17 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -116,17 +116,17 @@ class _UserGenderPageState extends State<UserGenderPage> {
}); });
}, },
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15), padding: EdgeInsets.only(left: 15.w, right: 15.w),
color: Colors.transparent, color: Colors.transparent,
height: 35, height: 35.w,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
const Text( Text(
"女", "女",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.w,
color: Colours.c3, color: Colours.c3,
), ),
), ),
...@@ -158,7 +158,7 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -158,7 +158,7 @@ class _UserGenderPageState extends State<UserGenderPage> {
), ),
Container( Container(
color: Colours.cLine, color: Colours.cLine,
margin: const EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10.w),
height: 1, height: 1,
), ),
GestureDetector( GestureDetector(
...@@ -183,17 +183,17 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -183,17 +183,17 @@ class _UserGenderPageState extends State<UserGenderPage> {
)*/ )*/
Container( Container(
padding: const EdgeInsets.only(left: 15, right: 15), padding: EdgeInsets.only(left: 15.w, right: 15.w),
color: Colors.transparent, color: Colors.transparent,
height: 35, height: 35.w,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
const Text( Text(
"保密", "保密",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.w,
color: Colours.c3, color: Colours.c3,
), ),
), ),
......
...@@ -24,34 +24,34 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -24,34 +24,34 @@ class _UserInfoPageState extends State<UserInfoPage> {
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: AppTheme.margin, vertical: AppTheme.margin), horizontal: AppTheme.margin, vertical: AppTheme.margin),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
/// 头像 /// 头像
Container( Container(
height: 52, height: 52.w,
padding: const EdgeInsets.only(left: 18, right: 15), padding: EdgeInsets.only(left: 18.w, right: 15.w),
child: GestureDetector( child: GestureDetector(
onTap: () async { onTap: () async {
final assets = await AssetsPicker.image( final assets = await AssetsPicker.image(
context: context, context: context,
source: ImageSource.gallery, source: ImageSource.gallery,
maxWidth: 512, maxWidth: 512.w,
maxHeight: 512, maxHeight: 512.w,
); );
controller.upload(path: assets!.path); controller.upload(path: assets!.path);
}, },
...@@ -60,11 +60,11 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -60,11 +60,11 @@ class _UserInfoPageState extends State<UserInfoPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
const Text( Text(
'头像', '头像',
style: TextStyle( style: TextStyle(
color: Colours.c3, color: Colours.c3,
fontSize: 14, fontSize: 14.w,
height: 1.6), height: 1.6),
), ),
Row( Row(
...@@ -83,8 +83,8 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -83,8 +83,8 @@ class _UserInfoPageState extends State<UserInfoPage> {
), ),
Gaps.hGaps10, Gaps.hGaps10,
SizedBox( SizedBox(
width: 5, width: 5.w,
height: 8, height: 8.w,
child: Image.asset( child: Image.asset(
'assets/images/right_arrow.png'), 'assets/images/right_arrow.png'),
) )
...@@ -97,8 +97,8 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -97,8 +97,8 @@ class _UserInfoPageState extends State<UserInfoPage> {
), ),
Container( Container(
color: Colours.cLine, color: Colours.cLine,
margin: const EdgeInsets.symmetric(horizontal: 15), margin: EdgeInsets.symmetric(horizontal: 15.w),
height: 1, height: 1.w,
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
...@@ -110,8 +110,8 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -110,8 +110,8 @@ class _UserInfoPageState extends State<UserInfoPage> {
)), )),
Container( Container(
color: Colours.cLine, color: Colours.cLine,
margin: const EdgeInsets.symmetric(horizontal: 15), margin: EdgeInsets.symmetric(horizontal: 15.w),
height: 1, height: 1.w,
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
...@@ -143,17 +143,17 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -143,17 +143,17 @@ class _UserInfoPageState extends State<UserInfoPage> {
Widget _buildItem(String title, String value) { Widget _buildItem(String title, String value) {
return Container( return Container(
padding: const EdgeInsets.only(left: 18, right: 15), padding: EdgeInsets.only(left: 18.w, right: 15.w),
color: Colors.transparent, color: Colors.transparent,
height: 52, height: 52.w,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
title, title,
style: const TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.w,
color: Colours.c3, color: Colours.c3,
), ),
), ),
...@@ -161,15 +161,15 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -161,15 +161,15 @@ class _UserInfoPageState extends State<UserInfoPage> {
children: [ children: [
Text( Text(
value, value,
style: const TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14.w,
color: Colours.c9, color: Colours.c9,
), ),
), ),
Gaps.hGaps10, Gaps.hGaps10,
SizedBox( SizedBox(
width: 5, width: 5.w,
height: 8, height: 8.w,
child: Image.asset('assets/images/right_arrow.png'), child: Image.asset('assets/images/right_arrow.png'),
) )
], ],
......
...@@ -12,17 +12,17 @@ class BuildItem extends StatelessWidget { ...@@ -12,17 +12,17 @@ class BuildItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: const EdgeInsets.only(left: 10,top: 15,bottom: 15), padding: EdgeInsets.only(left: 10.w,top: 15.w,bottom: 15.w),
margin: const EdgeInsets.only(top:15,left: 10,right: 10), margin: EdgeInsets.only(top:15.w,left: 10.w,right: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), // 阴影颜色 color: Colours.cC7.withOpacity(0.5), // 阴影颜色
spreadRadius: 2, // 阴影扩散半径 spreadRadius: 2.w, // 阴影扩散半径
blurRadius: 5, // 阴影模糊半径 blurRadius: 5.w, // 阴影模糊半径
offset: const Offset(0, 2), // 阴影偏移 offset: Offset(0, 2.w), // 阴影偏移
), ),
], ],
...@@ -33,20 +33,20 @@ class BuildItem extends StatelessWidget { ...@@ -33,20 +33,20 @@ class BuildItem extends StatelessWidget {
children: [ children: [
/// 左侧 /// 左侧
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
), ),
/// 右侧 /// 右侧
Expanded( Expanded(
child: Container( child: Container(
margin: const EdgeInsets.only(left: 10,right: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',overflow: TextOverflow.ellipsis,maxLines: 1,style: const TextStyle(fontSize: 14,fontWeight: Fonts.medium,height: 1.5,color: Colours.c3),), Text(model.bookName??'',overflow: TextOverflow.ellipsis,maxLines: 1,style: TextStyle(fontSize: 14.w,fontWeight: Fonts.medium,height: 1.5,color: Colours.c3),),
const SizedBox(height: 4,), SizedBox(height: 4.w,),
Text(model.authors??'',style: const TextStyle(fontSize: 12,color: Colours.c9,height: 1.5),), Text(model.authors??'',style: TextStyle(fontSize: 12.w,color: Colours.c9,height: 1.5),),
Gaps.vGaps15, Gaps.vGaps15,
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -56,9 +56,9 @@ class BuildItem extends StatelessWidget { ...@@ -56,9 +56,9 @@ class BuildItem extends StatelessWidget {
GestureDetector( GestureDetector(
onTap: onTap, onTap: onTap,
child: Container( child: Container(
padding: const EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10.w),
width: 30, width: 30.w,
height: 30, height: 30.w,
// color: Colors.yellow, // color: Colors.yellow,
child: Image.asset( child: Image.asset(
'assets/images/del.png', 'assets/images/del.png',
......
...@@ -4,6 +4,7 @@ import 'package:easy_refresh/easy_refresh.dart'; ...@@ -4,6 +4,7 @@ import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_book/apis/index.dart'; import 'package:flutter_book/apis/index.dart';
import 'package:flutter_book/models/index.dart'; import 'package:flutter_book/models/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
......
...@@ -10,11 +10,11 @@ class BuildItem extends StatelessWidget { ...@@ -10,11 +10,11 @@ class BuildItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10,right: 10,top:10), margin: EdgeInsets.only(left: 10.w,right: 10.w,top:10.w),
padding: const EdgeInsets.symmetric(horizontal: 10,vertical: 10), padding: const EdgeInsets.symmetric(horizontal: 10,vertical: 10),
height: 75, height: 75.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white color: Colors.white
), ),
child: Row( child: Row(
...@@ -28,10 +28,10 @@ class BuildItem extends StatelessWidget { ...@@ -28,10 +28,10 @@ class BuildItem extends StatelessWidget {
shape: badges.BadgeShape.circle shape: badges.BadgeShape.circle
), ),
child: Container( child: Container(
width: 30, width: 30.w,
height: 30, height: 30.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15.w),
color: AppTheme.primary.withOpacity(0.1) color: AppTheme.primary.withOpacity(0.1)
), ),
child: Image.asset( child: Image.asset(
...@@ -47,12 +47,12 @@ class BuildItem extends StatelessWidget { ...@@ -47,12 +47,12 @@ class BuildItem extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text(model.title??'',style: const TextStyle(fontSize: 15,height: 1.4,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.title??'',style: TextStyle(fontSize: 15.w,height: 1.4,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.createTime??'',style: const TextStyle(fontSize:11,height: 1.4,color: Colours.c9)) Text(model.createTime??'',style: TextStyle(fontSize:11.w,height: 1.4,color: Colours.c9))
], ],
), ),
Gaps.vGaps5, Gaps.vGaps5,
Text(model.content??'',style: const TextStyle(fontSize: 13,height: 1.4,color: Colours.c6),) Text(model.content??'',style: TextStyle(fontSize: 13.w,height: 1.4,color: Colours.c6),)
], ],
), ),
) )
......
...@@ -29,11 +29,11 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -29,11 +29,11 @@ class _UserNickPageState extends State<UserNickPage> {
title: const Text('设置昵称'), title: const Text('设置昵称'),
actions: [ actions: [
Container( Container(
height: 20, height: 20.w,
width: 40, width: 40.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10.w),
border: Border.all(color: Colours.c3, width: 0.5)), border: Border.all(color: Colours.c3, width: 0.5.w)),
child: Center( child: Center(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
...@@ -41,10 +41,10 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -41,10 +41,10 @@ class _UserNickPageState extends State<UserNickPage> {
controller.changeInfo(_textFieldController.text); controller.changeInfo(_textFieldController.text);
_focusNode.unfocus(); _focusNode.unfocus();
}, },
child: const Text( child: Text(
'保存', '保存',
style: TextStyle( style: TextStyle(
fontSize: 12, color: Colours.c3), fontSize: 12.w, color: Colours.c3),
)), )),
), ),
) )
...@@ -52,33 +52,33 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -52,33 +52,33 @@ class _UserNickPageState extends State<UserNickPage> {
), ),
body: Container( body: Container(
margin: EdgeInsets.only(left: AppTheme.margin,right: AppTheme.margin,top: AppTheme.margin), margin: EdgeInsets.only(left: AppTheme.margin,right: AppTheme.margin,top: AppTheme.margin),
height: 42, height: 42.w,
decoration: BoxDecoration(boxShadow: [ decoration: BoxDecoration(boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withOpacity(0.5),
spreadRadius: 0, spreadRadius: 0.w,
blurRadius: 10, blurRadius: 10.w,
offset: const Offset(3, 0), offset: Offset(3.w, 0),
), ),
], borderRadius: BorderRadius.circular(8), color: Colors.white), ], borderRadius: BorderRadius.circular(8.w), color: Colors.white),
child: Container( child: Container(
padding: const EdgeInsets.only( padding: EdgeInsets.only(
left: 15, left: 15.w,
right: 15, right: 15.w,
), ),
child: Row( child: Row(
children: [ children: [
const Text( Text(
'昵称', '昵称',
style: TextStyle(fontSize: 14, color: Colours.c3), style: TextStyle(fontSize: 14.w, color: Colours.c3),
), ),
Gaps.hGaps15, Gaps.hGaps15,
Expanded( Expanded(
child: TextField( child: TextField(
controller: _textFieldController, controller: _textFieldController,
style: style:
const TextStyle(fontSize: 14, color: Colours.c3), TextStyle(fontSize: 14.w, color: Colours.c3),
decoration: const InputDecoration( decoration: InputDecoration(
filled: true, filled: true,
fillColor: Colors.transparent, fillColor: Colors.transparent,
// 设置背景颜色为透明 // 设置背景颜色为透明
...@@ -87,7 +87,7 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -87,7 +87,7 @@ class _UserNickPageState extends State<UserNickPage> {
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
suffixIconConstraints: BoxConstraints.tightFor( suffixIconConstraints: BoxConstraints.tightFor(
height: 15, width: 15)), height: 15.w, width: 15.w)),
focusNode: _focusNode, focusNode: _focusNode,
), ),
), ),
......
...@@ -23,21 +23,21 @@ class _UserNotePageState extends State<UserNotePage> { ...@@ -23,21 +23,21 @@ class _UserNotePageState extends State<UserNotePage> {
onLoading: controller.onLoading, onLoading: controller.onLoading,
child:SingleChildScrollView( child:SingleChildScrollView(
child: Container( child: Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: ListView.builder( child: ListView.builder(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
......
...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget { ...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget {
return Container( return Container(
color: Colors.white, color: Colors.white,
// margin: const EdgeInsets.symmetric(horizontal: 10), // margin: const EdgeInsets.symmetric(horizontal: 10),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
// margin: const EdgeInsets.all(10), // margin: const EdgeInsets.all(10),
// decoration: BoxDecoration( // decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8), // borderRadius: BorderRadius.circular(8),
...@@ -34,36 +34,36 @@ class BuildItem extends StatelessWidget { ...@@ -34,36 +34,36 @@ class BuildItem extends StatelessWidget {
children: [ children: [
index == 0 ? Container( index == 0 ? Container(
// padding: const EdgeInsets.only(left: 10), // padding: const EdgeInsets.only(left: 10),
height: 32, height: 32.w,
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(8), topLeft: Radius.circular(8.w),
topRight: Radius.circular(8), topRight: Radius.circular(8.w),
), ),
color: Colors.white, color: Colors.white,
), ),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text('共$num本书',style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c6),), child: Text('共$num本书',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c6),),
):const SizedBox(), ):const SizedBox(),
Container( Container(
height: 0.5, height: 0.5,
color: Colours.cF0, color: Colours.cF0,
), ),
Container( Container(
padding: const EdgeInsets.only(top: 12,bottom: 15), padding: EdgeInsets.only(top: 12.w,bottom: 15.w),
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
), ),
Container( Container(
height: 87, height: 87.w,
margin: const EdgeInsets.only(left: 13), margin: EdgeInsets.only(left: 13.w),
// color: Colors.green, // color: Colors.green,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -72,11 +72,11 @@ class BuildItem extends StatelessWidget { ...@@ -72,11 +72,11 @@ class BuildItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.bookName??'',style: TextStyle(fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),), Text(model.authors??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c6),),
], ],
), ),
Text('${model.notesNum.toString()}个笔记',style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)), Text('${model.notesNum.toString()}个笔记',style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary)),
], ],
), ),
) )
......
...@@ -38,20 +38,20 @@ class _UserNotesDesPageState extends State<UserNotesDesPage> { ...@@ -38,20 +38,20 @@ class _UserNotesDesPageState extends State<UserNotesDesPage> {
child: Container( child: Container(
width: double.infinity, width: double.infinity,
color: Colors.white, color: Colors.white,
height: 35, height: 35.w,
child: TabBar( child: TabBar(
indicator: UnderlineTabIndicator( indicator: UnderlineTabIndicator(
borderRadius: BorderRadius.circular(0.75), borderRadius: BorderRadius.circular(0.75),
borderSide: const BorderSide(width: 1.5,color: AppTheme.primary), borderSide: BorderSide(width: 1.5.w,color: AppTheme.primary),
insets: const EdgeInsets.symmetric(horizontal: 22), // 设置标签下面指示器的水平内边距 insets: EdgeInsets.symmetric(horizontal: 22.w), // 设置标签下面指示器的水平内边距
), ),
labelPadding: const EdgeInsets.symmetric(horizontal: 20), labelPadding: EdgeInsets.symmetric(horizontal: 20.w),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: AppTheme.primary, indicatorColor: AppTheme.primary,
indicatorWeight: 1.5, indicatorWeight: 1.5,
labelStyle: const TextStyle(color: AppTheme.primary,fontSize: 15,height: 1.5,fontWeight: Fonts.medium), labelStyle: TextStyle(color: AppTheme.primary,fontSize: 15.w,height: 1.5,fontWeight: Fonts.medium),
unselectedLabelColor: Colours.c9, unselectedLabelColor: Colours.c9,
unselectedLabelStyle: const TextStyle(color: Colours.c9,fontSize: 15,height: 1.5), unselectedLabelStyle: TextStyle(color: Colours.c9,fontSize: 15.w,height: 1.5),
isScrollable: true, isScrollable: true,
tabs: tabs tabs: tabs
), ),
......
...@@ -10,15 +10,15 @@ class BuildHigh extends StatelessWidget { ...@@ -10,15 +10,15 @@ class BuildHigh extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10,right: 10,top: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 10.w),
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(1.5, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -27,8 +27,8 @@ class BuildHigh extends StatelessWidget { ...@@ -27,8 +27,8 @@ class BuildHigh extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.content??'',style: const TextStyle( Text(model.content??'',style: TextStyle(
fontSize: 14, fontSize: 14.w,
height: 1.5, height: 1.5,
color: Colors.red, color: Colors.red,
...@@ -36,9 +36,9 @@ class BuildHigh extends StatelessWidget { ...@@ -36,9 +36,9 @@ class BuildHigh extends StatelessWidget {
Gaps.vGaps8, Gaps.vGaps8,
Container( Container(
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 5,horizontal: 10), padding: EdgeInsets.symmetric(vertical: 5.w,horizontal: 10.w),
color: Colours.cF8, color: Colours.cF8,
child: Text(model.chapterName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), child: Text(model.chapterName??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
) )
], ],
), ),
......
...@@ -10,36 +10,36 @@ class BuildItem extends StatelessWidget { ...@@ -10,36 +10,36 @@ class BuildItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: const EdgeInsets.only(top: 12,bottom: 15), padding: EdgeInsets.only(top: 12.w,bottom: 15.w),
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
), ),
Container( Container(
height: 87, height: 87.w,
margin: const EdgeInsets.only(left: 13), margin: EdgeInsets.only(left: 13.w),
// color: Colors.green, // color: Colors.green,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -48,11 +48,11 @@ class BuildItem extends StatelessWidget { ...@@ -48,11 +48,11 @@ class BuildItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.bookName??'',style: TextStyle(fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),), Text(model.authors??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c6),),
], ],
), ),
Text('${model.notesNum.toString()}个笔记',style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)), Text('${model.notesNum.toString()}个笔记',style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary)),
], ],
), ),
) )
......
...@@ -10,15 +10,15 @@ class BuildLine extends StatelessWidget { ...@@ -10,15 +10,15 @@ class BuildLine extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10,right: 10,top: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 10.w),
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(1.5, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -27,8 +27,8 @@ class BuildLine extends StatelessWidget { ...@@ -27,8 +27,8 @@ class BuildLine extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.content??'',style: const TextStyle( Text(model.content??'',style: TextStyle(
fontSize: 14, fontSize: 14.w,
height: 1.5, height: 1.5,
color: Colours.c3, color: Colours.c3,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
...@@ -38,9 +38,9 @@ class BuildLine extends StatelessWidget { ...@@ -38,9 +38,9 @@ class BuildLine extends StatelessWidget {
Gaps.vGaps8, Gaps.vGaps8,
Container( Container(
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 5,horizontal: 10), padding: EdgeInsets.symmetric(vertical: 5.w,horizontal: 10.w),
color: Colours.cF8, color: Colours.cF8,
child: Text(model.chapterName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), child: Text(model.chapterName??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
) )
], ],
), ),
......
...@@ -10,15 +10,15 @@ class BuildNote extends StatelessWidget { ...@@ -10,15 +10,15 @@ class BuildNote extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: const EdgeInsets.only(left: 10,right: 10,top: 10), margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 10.w),
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(1.5, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -28,7 +28,7 @@ class BuildNote extends StatelessWidget { ...@@ -28,7 +28,7 @@ class BuildNote extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('看来谁都不记得自己为何出现在此',style: TextStyle( Text('看来谁都不记得自己为何出现在此',style: TextStyle(
fontSize: 14, fontSize: 14.w,
height: 1.5, height: 1.5,
color: Colors.red, color: Colors.red,
...@@ -40,13 +40,13 @@ class BuildNote extends StatelessWidget { ...@@ -40,13 +40,13 @@ class BuildNote extends StatelessWidget {
Gaps.vGaps13, Gaps.vGaps13,
Container( Container(
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 5,horizontal: 10), padding: EdgeInsets.symmetric(vertical: 5.w,horizontal: 10.w),
color: Colours.cF8, color: Colours.cF8,
child:Column( child:Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.chapterName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text(model.chapterName??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
Text('内容:${model.content??''}',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text('内容:${model.content??''}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
], ],
) )
) )
...@@ -61,10 +61,10 @@ class BuildNote extends StatelessWidget { ...@@ -61,10 +61,10 @@ class BuildNote extends StatelessWidget {
// padding: const EdgeInsets.only(left: 13,top: 10), // padding: const EdgeInsets.only(left: 13,top: 10),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 6, crossAxisCount: 6,
crossAxisSpacing: 2, crossAxisSpacing: 2.w,
mainAxisSpacing: 2, mainAxisSpacing: 2.w,
childAspectRatio: 1 childAspectRatio: 1
), ),
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
...@@ -82,10 +82,10 @@ class BuildNote extends StatelessWidget { ...@@ -82,10 +82,10 @@ class BuildNote extends StatelessWidget {
// padding: const EdgeInsets.only(left: 13,top: 10), // padding: const EdgeInsets.only(left: 13,top: 10),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 6, crossAxisCount: 6,
crossAxisSpacing: 2, crossAxisSpacing: 2.w,
mainAxisSpacing: 2, mainAxisSpacing: 2.w,
childAspectRatio: 1 childAspectRatio: 1
), ),
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
......
...@@ -21,14 +21,14 @@ class _UserPointPageState extends State<UserPointPage> { ...@@ -21,14 +21,14 @@ class _UserPointPageState extends State<UserPointPage> {
onRefresh: controller.onRefresh, onRefresh: controller.onRefresh,
onLoading: controller.onLoading, onLoading: controller.onLoading,
child: Container( child: Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
......
...@@ -14,7 +14,7 @@ class BuildCell extends StatelessWidget { ...@@ -14,7 +14,7 @@ class BuildCell extends StatelessWidget {
children: [ children: [
Container( Container(
// color: Colors.green, // color: Colors.green,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
...@@ -22,10 +22,10 @@ class BuildCell extends StatelessWidget { ...@@ -22,10 +22,10 @@ class BuildCell extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Container( Container(
width: 27, width: 27.w,
height: 27, height: 27.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(13.5), borderRadius: BorderRadius.circular(13.5.w),
color: Colors.cyan, color: Colors.cyan,
), ),
), ),
...@@ -34,19 +34,19 @@ class BuildCell extends StatelessWidget { ...@@ -34,19 +34,19 @@ class BuildCell extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Gaps.vGaps15, Gaps.vGaps15,
Text(model.remarks??'',style: const TextStyle(color: Colours.c3,fontSize: 14,height: 1.6,fontWeight: Fonts.medium),), Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),),
Text(model.createTime??'',style:const TextStyle(color: Colours.c9,fontSize: 10,height: 1.6,)), Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)),
Gaps.vGaps15, Gaps.vGaps15,
], ],
) )
], ],
), ),
), ),
Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: const TextStyle(fontSize: 17,fontWeight: Fonts.medium,color: AppTheme.primary),) Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: AppTheme.primary),)
], ],
), ),
), ),
Container(color: Colours.cLine,margin: const EdgeInsets.symmetric(horizontal: 15),height: 1,), Container(color: Colours.cLine,margin: EdgeInsets.symmetric(horizontal: 15.w),height: 1.w,),
], ],
); );
} }
......
...@@ -23,14 +23,14 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -23,14 +23,14 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
body: Column( body: Column(
children: [ children: [
Container( Container(
margin: const EdgeInsets.symmetric(vertical: 10,horizontal: 10), margin: EdgeInsets.symmetric(vertical: 10.w,horizontal: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -45,8 +45,8 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -45,8 +45,8 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
child: _buildItem(title: '修改手机号码', value: widget.model.phone??'') child: _buildItem(title: '修改手机号码', value: widget.model.phone??'')
), ),
Container( Container(
margin: const EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10.w),
height: 0.5, height: 0.5.w,
color:Colours.cF0, color:Colours.cF0,
), ),
GestureDetector( GestureDetector(
...@@ -59,14 +59,14 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -59,14 +59,14 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
), ),
), ),
Container( Container(
margin: const EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -85,7 +85,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -85,7 +85,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
Widget _buildItem({required String title,required String value}){ Widget _buildItem({required String title,required String value}){
return Container( return Container(
margin: const EdgeInsets.only(left: 15,right: 15), margin: EdgeInsets.only(left: 15.w,right: 15.w),
color: Colors.white, color: Colors.white,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -96,14 +96,14 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -96,14 +96,14 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
}, },
child: Container( child: Container(
color: Colors.white, color: Colors.white,
height:45, height:45.w,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text(title,style: const TextStyle(fontSize: 13,height: 1.5, color: Colours.c3)), child: Text(title,style: TextStyle(fontSize: 13.w,height: 1.5, color: Colours.c3)),
), ),
), ),
Row( Row(
children: [ children: [
Text(value,style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c9),), Text(value,style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c9),),
Gaps.hGaps10, Gaps.hGaps10,
Image.asset('assets/images/right_arrow.png') Image.asset('assets/images/right_arrow.png')
], ],
......
...@@ -21,15 +21,15 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -21,15 +21,15 @@ class _UserSetPageState extends State<UserSetPage> {
body: Column( body: Column(
children: [ children: [
Container( Container(
margin: const EdgeInsets.symmetric(vertical: 10,horizontal: 10), margin: EdgeInsets.symmetric(vertical: 10.w,horizontal: 10.w),
padding: const EdgeInsets.only(right: 10), padding: EdgeInsets.only(right: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
...@@ -44,15 +44,15 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -44,15 +44,15 @@ class _UserSetPageState extends State<UserSetPage> {
}, },
child: Container( child: Container(
color: Colors.white, color: Colors.white,
margin: const EdgeInsets.only(left: 15), margin: EdgeInsets.only(left: 15.w),
height:45, height:45.w,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: const Text('清除缓存',style: TextStyle(fontSize: 14,color: Colours.c3)), child: Text('清除缓存',style: TextStyle(fontSize: 14.w,color: Colours.c3)),
), ),
), ),
Container( Container(
margin: const EdgeInsets.only(left: 10), margin: EdgeInsets.only(left: 10.w),
height: 0.5, height: 0.5.w,
color:Colours.cF0, color:Colours.cF0,
), ),
GestureDetector( GestureDetector(
...@@ -61,15 +61,15 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -61,15 +61,15 @@ class _UserSetPageState extends State<UserSetPage> {
}, },
child: Container( child: Container(
color: Colors.white, color: Colors.white,
margin: const EdgeInsets.only(left: 15), margin: EdgeInsets.only(left: 15.w),
height:45, height:45.w,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: const Text('查看更新 >',style: TextStyle(fontSize: 14,color: Colours.c3)), child: Text('查看更新 >',style: TextStyle(fontSize: 14.w,color: Colours.c3)),
), ),
), ),
Container( Container(
margin: const EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10.w),
height: 0.5, height: 0.5.w,
color:Colours.cF0, color:Colours.cF0,
), ),
GestureDetector( GestureDetector(
...@@ -78,10 +78,10 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -78,10 +78,10 @@ class _UserSetPageState extends State<UserSetPage> {
}, },
child: Container( child: Container(
color: Colors.white, color: Colors.white,
margin: const EdgeInsets.only(left: 15), margin: EdgeInsets.only(left: 15.w),
height:45, height:45.w,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: const Text('版本介绍 >',style: TextStyle(fontSize: 14,color: Colours.c3)), child: Text('版本介绍 >',style: TextStyle(fontSize: 14.w,color: Colours.c3)),
), ),
) )
], ],
...@@ -101,23 +101,23 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -101,23 +101,23 @@ class _UserSetPageState extends State<UserSetPage> {
} }
}, },
child: Container( child: Container(
height: 42, height: 42.w,
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
margin: EdgeInsets.symmetric(horizontal: AppTheme.margin), margin: EdgeInsets.symmetric(horizontal: AppTheme.margin),
child: const Text('退出登录',style: TextStyle(fontSize: 14,color: Colours.c3),), child: Text('退出登录',style: TextStyle(fontSize: 14.w,color: Colours.c3),),
), ),
) )
], ],
...@@ -152,10 +152,10 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -152,10 +152,10 @@ class _UserSetPageState extends State<UserSetPage> {
onWillPop: () => Future.value(!forcedUpgrade), onWillPop: () => Future.value(!forcedUpgrade),
child: AlertDialog( child: AlertDialog(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0.w),
), ),
title: const Text('发现新版本',style: TextStyle(fontSize: 16,fontWeight: Fonts.medium,color: Colours.c3),), title: Text('发现新版本',style: TextStyle(fontSize: 16.w,fontWeight: Fonts.medium,color: Colours.c3),),
content: Text(_getModel.remarks??'',style: const TextStyle(fontSize: 13,fontWeight: Fonts.medium,color: Colours.c3),), content: Text(_getModel.remarks??'',style: TextStyle(fontSize: 13.w,fontWeight: Fonts.medium,color: Colours.c3),),
actions: <Widget>[ actions: <Widget>[
if (!forcedUpgrade) if (!forcedUpgrade)
TextButton( TextButton(
......
...@@ -23,14 +23,14 @@ class _UserWrongPageState extends State<UserWrongPage> { ...@@ -23,14 +23,14 @@ class _UserWrongPageState extends State<UserWrongPage> {
onLoading: controller.onLoading, onLoading: controller.onLoading,
child:SingleChildScrollView( child:SingleChildScrollView(
child: Container( child: Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
......
...@@ -15,7 +15,7 @@ class BuildItem extends StatelessWidget { ...@@ -15,7 +15,7 @@ class BuildItem extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
// margin: const EdgeInsets.symmetric(horizontal: 10), // margin: const EdgeInsets.symmetric(horizontal: 10),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: EdgeInsets.symmetric(horizontal: 10.w),
// margin: const EdgeInsets.all(10), // margin: const EdgeInsets.all(10),
// decoration: BoxDecoration( // decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8), // borderRadius: BorderRadius.circular(8),
...@@ -33,7 +33,7 @@ class BuildItem extends StatelessWidget { ...@@ -33,7 +33,7 @@ class BuildItem extends StatelessWidget {
children: [ children: [
index == 0 ? Container( index == 0 ? Container(
// padding: const EdgeInsets.only(left: 10), // padding: const EdgeInsets.only(left: 10),
height: 32, height: 32.w,
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
...@@ -43,26 +43,26 @@ class BuildItem extends StatelessWidget { ...@@ -43,26 +43,26 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
), ),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text('共$num本书',style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c6),), child: Text('共$num本书',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c6),),
):const SizedBox(), ):const SizedBox(),
Container( Container(
height: 0.5, height: 0.5.w,
color: Colours.cF0, color: Colours.cF0,
), ),
Container( Container(
padding: const EdgeInsets.only(top: 12,bottom: 15), padding: EdgeInsets.only(top: 12.w,bottom: 15.w),
// color: Colors.red, // color: Colors.red,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
CustomCard( CustomCard(
width: 72, width: 72.w,
height: 86, height: 86.w,
url: model.img??'', url: model.img??'',
), ),
Container( Container(
height: 87, height: 87.w,
margin: const EdgeInsets.only(left: 13), margin: EdgeInsets.only(left: 13.w),
// color: Colors.green, // color: Colors.green,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
...@@ -71,11 +71,11 @@ class BuildItem extends StatelessWidget { ...@@ -71,11 +71,11 @@ class BuildItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.bookName??'',style: TextStyle(fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),), Text(model.authors??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c6),),
], ],
), ),
Text('${model.wrongNum.toString()}个错题',style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)), Text('${model.wrongNum.toString()}个错题',style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary)),
], ],
), ),
) )
......
...@@ -24,21 +24,21 @@ class _VersionPageState extends State<VersionPage> { ...@@ -24,21 +24,21 @@ class _VersionPageState extends State<VersionPage> {
onLoading: controller.onLoading, onLoading: controller.onLoading,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
margin: const EdgeInsets.all(10), margin: EdgeInsets.all(10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
), ),
], ],
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8.w),
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
......
...@@ -11,7 +11,7 @@ class BuildItem extends StatelessWidget { ...@@ -11,7 +11,7 @@ class BuildItem extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Colors.white, color: Colors.white,
padding: const EdgeInsets.only(top: 10,right: 15,left: 15), padding: EdgeInsets.only(top: 10.w,right: 15.w,left: 15.w),
child: Column( child: Column(
children: [ children: [
Row( Row(
...@@ -20,8 +20,8 @@ class BuildItem extends StatelessWidget { ...@@ -20,8 +20,8 @@ class BuildItem extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(model.version??'',style: const TextStyle(fontSize: 14,height: 1.5,color: Colours.c3),), Text(model.version??'',style: TextStyle(fontSize: 14.w,height: 1.5,color: Colours.c3),),
Text(model.updateTime??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),), Text(model.updateTime??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
], ],
), ),
Image.asset('assets/images/right_arrow.png') Image.asset('assets/images/right_arrow.png')
...@@ -29,7 +29,7 @@ class BuildItem extends StatelessWidget { ...@@ -29,7 +29,7 @@ class BuildItem extends StatelessWidget {
), ),
Gaps.vGaps10, Gaps.vGaps10,
Container( Container(
height: 0.5, height: 0.5.w,
color: Colours.cF0, color: Colours.cF0,
) )
], ],
......
library version_des; library version_des;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../models/index.dart'; import '../../models/index.dart';
import '../../utils/index.dart'; import '../../utils/index.dart';
......
...@@ -15,8 +15,8 @@ class VersionDesPage extends StatelessWidget { ...@@ -15,8 +15,8 @@ class VersionDesPage extends StatelessWidget {
title: const Text('版本介绍'), title: const Text('版本介绍'),
), ),
body: Container( body: Container(
margin: const EdgeInsets.all(15), margin: EdgeInsets.all(15.w),
child: Text(model.remarks??'',style: const TextStyle(fontSize: 14,height: 1.5,color: Colours.c3),), child: Text(model.remarks??'',style: TextStyle(fontSize: 14.w,height: 1.5,color: Colours.c3),),
), ),
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论