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

优化代码

上级 86f0a2eb
...@@ -19,10 +19,6 @@ void main() { ...@@ -19,10 +19,6 @@ void main() {
Future.wait([ Future.wait([
UserStore.to.profile(), UserStore.to.profile(),
]).whenComplete(() { ]).whenComplete(() {
// String name = EncryptUtil.aesEncrypt('我是谁');
// print('2222222---------$name');
// final result = EncryptUtil.aesDecrypt(name);
// Console.log('解密--------------------------$result');
FlutterBugly.postCatchedException(() { FlutterBugly.postCatchedException(() {
// 如果需要 ensureInitialized,请在这里运行。 // 如果需要 ensureInitialized,请在这里运行。
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
...@@ -34,8 +30,6 @@ void main() { ...@@ -34,8 +30,6 @@ void main() {
}); });
// runApp(const MyApp()); // runApp(const MyApp());
//FlutterNativeSplash.remove(); //FlutterNativeSplash.remove();
}); });
}); });
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);
...@@ -44,7 +38,6 @@ void main() { ...@@ -44,7 +38,6 @@ void main() {
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({Key? key}): super(key: key); const MyApp({Key? key}): super(key: key);
// This widget is the root of your application. // This widget is the root of your application.
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
...@@ -26,11 +26,6 @@ class BookDetailController extends GetxController with GetSingleTickerProviderSt ...@@ -26,11 +26,6 @@ class BookDetailController extends GetxController with GetSingleTickerProviderSt
bool canTap = true; bool canTap = true;
@override
void onInit() {
super.onInit();
}
@override @override
void onReady() { void onReady() {
getBookDetails(); getBookDetails();
......
...@@ -44,7 +44,7 @@ class BuildCounter extends StatelessWidget { ...@@ -44,7 +44,7 @@ class BuildCounter extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text('合计 ¥${controller.allPrice.toStringAsFixed(2)}',style: TextStyle(color: AppTheme.primary,fontSize: 16.w,fontWeight: Fonts.boldSemi)), Text('合计 ¥${controller.allPrice.toStringAsFixed(2)}',style: TextStyle(color: AppTheme.primary,fontSize: 16.w,fontWeight: Fonts.boldSemi)),
Text('已选 ${controller.num} 件',style: TextStyle(color: Color(0xFF999999),fontSize: 12.w,)) Text('已选 ${controller.num} 件',style: TextStyle(color: const Color(0xFF999999),fontSize: 12.w,))
], ],
) )
], ],
......
...@@ -13,6 +13,8 @@ import 'package:flutter_sound_platform_interface/flutter_sound_recorder_platform ...@@ -13,6 +13,8 @@ import 'package:flutter_sound_platform_interface/flutter_sound_recorder_platform
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import '../../utils/index.dart';
part 'view.dart'; part 'view.dart';
......
...@@ -74,7 +74,7 @@ class _RecordPageState extends State<RecordPage> { ...@@ -74,7 +74,7 @@ class _RecordPageState extends State<RecordPage> {
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFFAF0E6), color: const Color(0xFFFAF0E6),
border: Border.all( border: Border.all(
color: Colors.indigo, color: Colors.indigo,
width: 3, width: 3,
...@@ -89,7 +89,7 @@ class _RecordPageState extends State<RecordPage> { ...@@ -89,7 +89,7 @@ class _RecordPageState extends State<RecordPage> {
//disabledColor: Colors.grey, //disabledColor: Colors.grey,
child: Text(_mPlayer!.isPlaying ? 'Stop' : 'Play'), child: Text(_mPlayer!.isPlaying ? 'Stop' : 'Play'),
), ),
SizedBox( const SizedBox(
width: 20, width: 20,
), ),
Text(_mPlayer!.isPlaying Text(_mPlayer!.isPlaying
...@@ -165,7 +165,7 @@ class _RecordPageState extends State<RecordPage> { ...@@ -165,7 +165,7 @@ class _RecordPageState extends State<RecordPage> {
List<FileSystemEntity> files = tempDir!.listSync(); List<FileSystemEntity> files = tempDir!.listSync();
for (FileSystemEntity file in files) { for (FileSystemEntity file in files) {
print('File: ${file.path}'); Console.log('File: ${file.path}');
} }
setState(() { setState(() {
......
...@@ -35,7 +35,7 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -35,7 +35,7 @@ class _UserGenderPageState extends State<UserGenderPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -35,7 +35,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> { ...@@ -35,7 +35,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('等待付款'), title: const Text('等待付款'),
actions: [], actions: const [],
), ),
body: Column( body: Column(
children: [ children: [
......
...@@ -17,7 +17,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -17,7 +17,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
builder: (controller) => Scaffold( builder: (controller) => Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('已取消'), title: const Text('已取消'),
actions: [], actions: const [],
), ),
body:Column(children: [ body:Column(children: [
Container( Container(
...@@ -67,7 +67,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -67,7 +67,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, // 下面的Text靠左 CrossAxisAlignment.start, // 下面的Text靠左
children: [ children: [
Container( SizedBox(
height: 62.5.w, height: 62.5.w,
child: Text( child: Text(
controller.model?.bookList?[0].name??'', controller.model?.bookList?[0].name??'',
...@@ -139,7 +139,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -139,7 +139,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
integralPrice: controller.model.integralPrice.toString(),); integralPrice: controller.model.integralPrice.toString(),);
}, },
).then((value) { ).then((value) {
print('点击了应付款后面'); Console.log('点击了应付款后面');
}); });
}, },
......
...@@ -25,32 +25,29 @@ class _RefundedDetailsState extends State<RefundedDetailsPage> { ...@@ -25,32 +25,29 @@ class _RefundedDetailsState extends State<RefundedDetailsPage> {
padding: EdgeInsets.symmetric(vertical: 17.w), padding: EdgeInsets.symmetric(vertical: 17.w),
width: double.infinity, width: double.infinity,
margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w), margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w),
child: Container( child: Stack(
// color: Colors.red, children: [
child:Stack( const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
const Row( Text('金额明细',textAlign:TextAlign.center),
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'),
),
),
)
], ],
),
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'),
),
),
) )
],
), ),
), ),
SizedBox(height: 30.w,), SizedBox(height: 30.w,),
......
...@@ -18,29 +18,27 @@ class BuildCell extends StatelessWidget { ...@@ -18,29 +18,27 @@ class BuildCell extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Row(
child: Row( children: [
children: [ Container(
Container( width: 27.w,
width: 27.w, height: 27.w,
height: 27.w, decoration: BoxDecoration(
decoration: BoxDecoration( borderRadius: BorderRadius.circular(13.5.w),
borderRadius: BorderRadius.circular(13.5.w), color: Colors.cyan,
color: Colors.cyan,
),
), ),
Gaps.hGaps10, ),
Column( Gaps.hGaps10,
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Gaps.vGaps15, children: [
Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),), Gaps.vGaps15,
Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)), Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),),
Gaps.vGaps15, 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),) Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: model.options == 1?AppTheme.primary:Colours.c3),)
], ],
......
...@@ -366,7 +366,7 @@ class CustomInputSearch extends StatelessWidget { ...@@ -366,7 +366,7 @@ class CustomInputSearch extends StatelessWidget {
color: Colours.c3.withOpacity(0.1), // 阴影颜色 color: Colours.c3.withOpacity(0.1), // 阴影颜色
spreadRadius: 2, // 阴影扩散程度 spreadRadius: 2, // 阴影扩散程度
blurRadius: 4, // 阴影模糊程度 blurRadius: 4, // 阴影模糊程度
offset: Offset(0, 2), // 阴影位置 offset: const Offset(0, 2), // 阴影位置
), ),
], ],
borderRadius: BorderRadius.circular(360), // 容器圆角 borderRadius: BorderRadius.circular(360), // 容器圆角
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论