提交 726b0bca authored 作者: yueweilu's avatar yueweilu

添加 必要const

上级 00a35c97
......@@ -144,7 +144,7 @@ class BookInfoPage extends StatelessWidget {
children: [
StarScore(
score: num,
star: Star(
star: const Star(
fillColor: Colours.cE2,
size: 12,
emptyColor: Colours.cE2,
......
......@@ -3,7 +3,6 @@ library forget_pwd;
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
......
......@@ -23,10 +23,10 @@ class _HomePageState extends State<HomePage> {
},
child: Container(
color: Colors.cyan,
child: Text('read_web'),
height: 40,
// width: double.infinity,
alignment: Alignment.center,
child: const Text('read_web'),
),
),
GestureDetector(
......@@ -35,10 +35,10 @@ class _HomePageState extends State<HomePage> {
},
child: Container(
color: Colors.indigo,
child: Text('关于我们'),
height: 40,
width: double.infinity,
alignment: Alignment.center,
child: const Text('关于我们'),
),
)
......
......@@ -14,34 +14,32 @@ class _TestPageState extends State<TestPage> with AutomaticKeepAliveClientMixin
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('分类'),
title: const Text('分类'),
bottom: PreferredSize(
preferredSize: Size.fromHeight(48.w),
child: Container(
child: Row(
children: [
// TabBar放在左侧
Expanded(
child: TabBar(
tabs: [
Tab(text: 'Tab 1'),
Tab(text: 'Tab 2'),
Tab(text: 'Tab 3'),
Tab(text: 'Tab 4'),
Tab(text: 'Tab 5'),
],
),
child: Row(
children: [
// TabBar放在左侧
const Expanded(
child: TabBar(
tabs: [
Tab(text: 'Tab 1'),
Tab(text: 'Tab 2'),
Tab(text: 'Tab 3'),
Tab(text: 'Tab 4'),
Tab(text: 'Tab 5'),
],
),
),
// 筛选按钮放在右侧
IconButton(
icon: Icon(Icons.filter_list),
onPressed: () {
// 处理筛选按钮点击事件
},
),
],
),
// 筛选按钮放在右侧
IconButton(
icon: const Icon(Icons.filter_list),
onPressed: () {
// 处理筛选按钮点击事件
},
),
],
),
)
),
......
......@@ -76,31 +76,28 @@ class _LibraryPageState extends State<LibraryPage> {
],
),
controller.filterLabels.isEmpty?const SizedBox():_buildLabel(),
Container(
// color: Colors.red,
child: Expanded(
child: CustomPullScrollView(
controller: controller.refreshController,
onRefresh: controller.onRefresh,
onLoading: controller.onLoading,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
controller.ads.isNotEmpty?Container(
color: Colors.transparent,
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: BuildBanner(
items:controller.ads,
onTap:(adModel){
context.pushNamed(Routes.adDetail,extra: adModel);
} ,
)
):const SizedBox(),
Expanded(
child: CustomPullScrollView(
controller: controller.refreshController,
onRefresh: controller.onRefresh,
onLoading: controller.onLoading,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
controller.ads.isNotEmpty?Container(
color: Colors.transparent,
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: BuildBanner(
items:controller.ads,
onTap:(adModel){
context.pushNamed(Routes.adDetail,extra: adModel);
} ,
)
):const SizedBox(),
LibraryContentPage(controller: controller,)
],
),
LibraryContentPage(controller: controller,)
],
),
),
),
......@@ -109,7 +106,7 @@ class _LibraryPageState extends State<LibraryPage> {
),
Visibility(
visible: controller.show,
child: Container(
child: SizedBox(
height: double.infinity,
child: FilterPage(
controller: controller,
......@@ -151,7 +148,7 @@ class _LibraryPageState extends State<LibraryPage> {
}
Widget _buildCategory(){
return Container(
return SizedBox(
height: 38.w,
child: GetBuilder<LibraryController>(
init: LibraryController(context),
......
......@@ -53,7 +53,6 @@ class _LoginPageState extends State<LoginPage> {
autovalidateMode: AutovalidateMode.always,
onChanged: (){
setState(() {
print('++++++++++++++++');
});
},
key: _formKey,
......@@ -65,7 +64,7 @@ class _LoginPageState extends State<LoginPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: 120.w,),
Container(
SizedBox(
width: 180.w,
height: 42.w,
// color: Colors.cyan,
......@@ -174,7 +173,6 @@ class _LoginPageState extends State<LoginPage> {
text: '立即登录',
isEnabled: controller.enable,
onPressed: () {
print('11111111111111111');
controller.onLogin(context);
// context.goNamed(Routes.order);
},
......
......@@ -13,62 +13,60 @@ class BuildRead extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Stack(
children: [
Container(
width: double.infinity,
child: Image.asset(
'assets/images/read_bg.png',fit: BoxFit.contain,
width: double.infinity,
// height: 96,
)
),
Positioned(
// top: 10.w,
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(vertical: 16.5.w,horizontal: 8),
color: Colors.transparent,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Colors.transparent,
// boxShadow: [
// BoxShadow(
// color: const Color(0xFFC7C7C7).withOpacity(0.5),
// offset: const Offset(3, 0),
// blurRadius: 10.w,
// spreadRadius: 0.w,
// ),
// ],
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: items.map((model){
return Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
if (onTap !=null) onTap!(model);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.5.w,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.name,style: TextStyle(fontSize: 13.w,height:1.5.w,color: Colours.c6))
],
),
return Stack(
children: [
SizedBox(
width: double.infinity,
child: Image.asset(
'assets/images/read_bg.png',fit: BoxFit.contain,
width: double.infinity,
// height: 96,
)
),
Positioned(
// top: 10.w,
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(vertical: 16.5.w,horizontal: 8),
color: Colors.transparent,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Colors.transparent,
// boxShadow: [
// BoxShadow(
// color: const Color(0xFFC7C7C7).withOpacity(0.5),
// offset: const Offset(3, 0),
// blurRadius: 10.w,
// spreadRadius: 0.w,
// ),
// ],
// ),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: items.map((model){
return Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
if (onTap !=null) onTap!(model);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.5.w,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.name,style: TextStyle(fontSize: 13.w,height:1.5.w,color: Colours.c6))
],
),
);
}).toList(),
),
),
);
}).toList(),
),
)
],
),
),
)
],
);
}
}
......@@ -39,7 +39,6 @@ class PayCouponController extends GetxController with GetSingleTickerProviderSta
price: payController.originalPrice.toString()
);
for(CouponModel model in result.list!) {
print('================================${tag}');
model.type = num.parse(tag);
}
......@@ -59,7 +58,6 @@ class PayCouponController extends GetxController with GetSingleTickerProviderSta
refreshController.finishRefresh(IndicatorResult.success);
refreshController.resetFooter();
} catch (error) {
print('--------------------------------$error');
refreshController.finishRefresh(IndicatorResult.fail);
}
}
......
......@@ -81,7 +81,7 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> {
},
child: Container(
margin: EdgeInsets.only(right: 15.w),
child: Text('取消'),
child: const Text('取消'),
)
):const SizedBox(),
],
......
......@@ -82,7 +82,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
},
child: Container(
margin: EdgeInsets.only(right: 15.w),
child: Text('取消'),
child: const Text('取消'),
)
):const SizedBox(),
],
......
......@@ -122,59 +122,56 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
itemCount: widget.controller.discussInputImages.length,
),
),
Container(
// color: Colors.red,
child: MediaQuery.removePadding(
context: context,
removeTop: true,
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (BuildContext context, int index){
AudioModel audioModel= widget.controller.discussInputAudios[index];
return Container(
// height: 20.w,
margin: EdgeInsets.only(right: 130.w,),
child: Stack(
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.w),
color: Colors.white,
),
padding: EdgeInsets.only(right:20.w,left: 10.w),
margin: EdgeInsets.only(top: 10.w,right: 10.w),
height: 20,
child: Row(
// mainAxisSize: MainAxisSize.min,
mainAxisAlignment:MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap:(){
widget.controller.playAudio(audioModel);
},
child: Image.asset('assets/images/audio.png')
),
Text('${audioModel.currentDuration}/${audioModel.duration}',style: TextStyle(fontSize: 10.w,height: 1.4,color: Colours.c9),)
],
),
MediaQuery.removePadding(
context: context,
removeTop: true,
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (BuildContext context, int index){
AudioModel audioModel= widget.controller.discussInputAudios[index];
return Container(
// height: 20.w,
margin: EdgeInsets.only(right: 130.w,),
child: Stack(
children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.w),
color: Colors.white,
),
Positioned(
right: 6,
top: 6,
child: GestureDetector(
onTap: (){
widget.controller.delAudio(audioModel);
padding: EdgeInsets.only(right:20.w,left: 10.w),
margin: EdgeInsets.only(top: 10.w,right: 10.w),
height: 20,
child: Row(
// mainAxisSize: MainAxisSize.min,
mainAxisAlignment:MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap:(){
widget.controller.playAudio(audioModel);
},
child: Image.asset('assets/images/media_del.png',width: 12.w,height: 12.w,)
)
)
],
),
);
},
itemCount: widget.controller.discussInputAudios.length,
),
child: Image.asset('assets/images/audio.png')
),
Text('${audioModel.currentDuration}/${audioModel.duration}',style: TextStyle(fontSize: 10.w,height: 1.4,color: Colours.c9),)
],
),
),
Positioned(
right: 6,
top: 6,
child: GestureDetector(
onTap: (){
widget.controller.delAudio(audioModel);
},
child: Image.asset('assets/images/media_del.png',width: 12.w,height: 12.w,)
)
)
],
),
);
},
itemCount: widget.controller.discussInputAudios.length,
),
)
],
......
......@@ -82,7 +82,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
},
child: Container(
margin: EdgeInsets.only(right: 15.w),
child: Text('取消'),
child: const Text('取消'),
)
):const SizedBox(),
],
......
......@@ -40,7 +40,7 @@ class _SplashPageState extends State<SplashPage> {
return Scaffold(
extendBodyBehindAppBar: true,
// appBar: AppBar(),
body: Container(
body: SizedBox(
height: double.infinity,
width: double.infinity,
child: Image.asset('assets/images/splash.png',fit: BoxFit.cover,),
......
......@@ -59,9 +59,9 @@ class HomeCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start,
children: [
Text('名称',textAlign: TextAlign.start,),
const Text('名称',textAlign: TextAlign.start,),
SizedBox(height: 20.w,),
Text(
const Text(
'描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述',
maxLines: 3,
overflow: TextOverflow.ellipsis,
......
......@@ -53,7 +53,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [
Row(
children: [
Container(
SizedBox(
width: 26.w,
height: 26.w,
// color: Colors.cyan,
......@@ -99,7 +99,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [
Row(
children: [
Container(
SizedBox(
width: 26.w,
height: 26.w,
child: Image.asset('assets/images/report_study.png',fit: BoxFit.cover,)
......@@ -147,7 +147,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [
Row(
children: [
Container(
SizedBox(
width: 26.w,
height: 26.w,
child: Image.asset('assets/images/report_test.png',fit: BoxFit.cover,)
......@@ -214,7 +214,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [
Row(
children: [
Container(
SizedBox(
width: 26.w,
height: 26.w,
// color: Colors.cyan,
......
......@@ -11,12 +11,10 @@ class BuildCard extends StatelessWidget {
Widget build(BuildContext context) {
return Stack(
children: [
Container(
child: Image.asset(
'assets/images/report_bg.png',
width: double.infinity,
fit: BoxFit.contain,
),
Image.asset(
'assets/images/report_bg.png',
width: double.infinity,
fit: BoxFit.contain,
),
Positioned(
left: 0,
......
......@@ -56,7 +56,7 @@ class _AboutPageState extends State<AboutPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9)),),
child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: const Color(0xFF2A82D9)),),
onTap: (){
context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserAgreement','title':'用户协议'});
},
......@@ -65,7 +65,7 @@ class _AboutPageState extends State<AboutPage> {
Container(width: 1.w,height: 10.w,color: const Color(0xFFC8C8C8),),
Gaps.vGaps15,
GestureDetector(
child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9))),
child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: const Color(0xFF2A82D9))),
onTap:(){
context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserPriAgreement','title':'隐私政策'});
} ,
......
......@@ -18,29 +18,27 @@ class BuildCell extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
child: Row(
children: [
Container(
width: 27.w,
height: 27.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(13.5.w),
color: Colors.cyan,
),
Row(
children: [
Container(
width: 27.w,
height: 27.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(13.5.w),
color: Colors.cyan,
),
Gaps.hGaps10,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Gaps.vGaps15,
Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),),
Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)),
Gaps.vGaps15,
],
)
],
),
),
Gaps.hGaps10,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Gaps.vGaps15,
Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),),
Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)),
Gaps.vGaps15,
],
)
],
),
Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: model.options == 1?AppTheme.primary:Colours.c3),)
],
......
......@@ -22,32 +22,29 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA
padding: EdgeInsets.symmetric(vertical: 17.w),
width: double.infinity,
margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w),
child: Container(
// color: Colors.red,
child:Stack(
children: [
const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('紫荆币充值',textAlign:TextAlign.center),
],
),
Positioned(
right: 0.w,
top: 0.w,
child: GestureDetector(
onTap: (){
context.pop();
},
child: SizedBox(
width: 20.w,
height: 20.w,
child: Image.asset('assets/images/close.png'),
),
child: Stack(
children: [
const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('紫荆币充值',textAlign:TextAlign.center),
],
),
Positioned(
right: 0.w,
top: 0.w,
child: GestureDetector(
onTap: (){
context.pop();
},
child: SizedBox(
width: 20.w,
height: 20.w,
child: Image.asset('assets/images/close.png'),
),
)
],
)
),
)
],
),
),
Container(
......@@ -75,7 +72,7 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA
child: RichText(text: TextSpan(
children: [
TextSpan(text: '充值即代表同意',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c9)),
TextSpan(text: '《用户充值协议》',style: TextStyle(fontSize: 13.w,height: 1.5,color: Color(0xFF2A82D9))),
TextSpan(text: '《用户充值协议》',style: TextStyle(fontSize: 13.w,height: 1.5,color: const Color(0xFF2A82D9))),
]
)),
),
......
......@@ -8,7 +8,7 @@ class BuildItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ColorFiltered(
colorFilter: ColorFilter.mode(Colors.transparent, BlendMode.saturation),
colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.saturation),
child: Container(
margin: EdgeInsets.only(left: 10.w, top: 10.w, right: 5.w),
child: Stack(
......
......@@ -46,7 +46,7 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> {
),
child: Column(children: [
ClipRRect(
borderRadius:BorderRadius.only(topLeft: Radius.circular(5.w),topRight: Radius.circular(5)),
borderRadius:BorderRadius.only(topLeft: Radius.circular(5.w),topRight: const Radius.circular(5)),
child: Container(
width: double.infinity,
color: Colors.white,
......
......@@ -133,7 +133,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
margin: EdgeInsets.only(top: 10.w),
child: ClipRRect(
borderRadius: BorderRadius.circular(17.5.w),
child: Container(
child: SizedBox(
width: 35.w,
height: 35.w,
child: CustomImage.network(url: model.personPic??'',placeholder: Image.asset('assets/images/user_default_icon.png'),),
......@@ -224,7 +224,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
widget.userDiscussDesController?.setDiscussModel(model);
widget.userDiscussDesController?.setFatherDiscussModel(fatherModel);
},
child: Container(
child: SizedBox(
height: 25.w,
width: 15.w,
// color: Colors.yellow,
......
......@@ -25,7 +25,7 @@ class _UserGenderPageState extends State<UserGenderPage> {
builder: (controller) => Scaffold(
appBar: CustomAppBar(
title: const Text('设置性别'),
actions: [],
actions: const [],
),
body: Container(
margin: EdgeInsets.symmetric(
......
......@@ -11,9 +11,7 @@ class UserInfoController extends GetxController {
}) async {
// String result = await CommonAPI.upload(path:path,fileTypes: 'user');
OssTool tool = OssTool('zxts-user-file');
print('------path--------------------------$path');
final response = await tool.putObjectFile(path);
print('------response--------------------------${response.realUri}');
_changeInfo(response.realUri.toString());
}
......
......@@ -96,7 +96,6 @@ class _UserNickPageState extends State<UserNickPage> {
onTap: () {
// 处理点击事件,可以执行任意操作
_textFieldController.clear();
print('Image Clicked!');
},
child: Image(
image: const AssetImage('assets/images/del.png'),
......
......@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
return Scaffold(
appBar: CustomAppBar(
title: const Text('待支付'),
actions: [],
actions: const [],
),
body: Column(
children: [
......
......@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> {
return Scaffold(
appBar: CustomAppBar(
title: const Text('已取消'),
actions: [],
actions: const [],
),
body: Column(
children: [
......
......@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> {
return Scaffold(
appBar: CustomAppBar(
title: const Text('已完成'),
actions: [],
actions: const [],
),
body: Column(
children: [
......
......@@ -24,7 +24,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
builder: (controller) => Scaffold(
appBar: CustomAppBar(
title: const Text('已完成'),
actions: [],
actions: const [],
),
body: Container(
width: double.infinity,
......@@ -73,7 +73,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
crossAxisAlignment:
CrossAxisAlignment.start, // 下面的Text靠左
children: [
Container(
SizedBox(
height: 47.5.w,
child: Text(
controller.model.bookList==null?'':
......@@ -206,7 +206,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
child: Align(
alignment: Alignment.centerRight,
child: Padding(
padding: EdgeInsets.only(right: 15.2),
padding: EdgeInsets.only(right: 15.2.w),
child: Container(
height: 23.w,
width: 60.w,
......
......@@ -17,7 +17,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
builder: (controller) => Scaffold(
appBar: CustomAppBar(
title: const Text('已退款'),
actions: [],
actions: const [],
),
body:Column(children: [
Container(
......@@ -67,7 +67,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
crossAxisAlignment:
CrossAxisAlignment.start, // 下面的Text靠左
children: [
Container(
SizedBox(
height: 62.5.w,
child: Text(
controller.model?.bookList?[0].name??'',
......
......@@ -3,7 +3,7 @@ part of utils;
class EncryptUtil {
/// md5 加密
static String encodeMd5(String data) {
var content = Utf8Encoder().convert(data);
var content = const Utf8Encoder().convert(data);
var digest = md5.convert(content);
return hex.encode(digest.bytes);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论