import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class ShortcutOperation extends StatefulWidget { final Function goToOrder; ShortcutOperation(this.goToOrder); @override State createState() { return _ShortcutOperation(); } } class _ShortcutOperation extends State { ApiService? apiService; @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return Container( // height: 70.h, width: double.infinity, margin: EdgeInsets.only(bottom: 16.h, left: 9.w, right: 9.w), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded( child: GestureDetector( onTap: () { widget.goToOrder(0); }, child: Container( width: double.infinity, margin: EdgeInsets.symmetric(horizontal: 5), padding: EdgeInsets.all(10.h), decoration: BoxDecoration( color: Colors.white, boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), offset: Offset(0, 2), blurRadius: 4, spreadRadius: 1, ), ], borderRadius: BorderRadius.circular(6), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( S.of(context).main_menu2, style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 14.sp, color: Colors.black, ), ), SizedBox(height: 5.h), Text( S.of(context).xiadanzhuanjifen, style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, color: Color(0xff4D4D4D), ), ), ], ), ), Image.asset( "assets/image/home_lm.webp", width: 24.w, height: 31.h, fit: BoxFit.fill, ), ], ), ), ), ), Expanded( child: GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/recharge_page'); }, child: Container( width: double.infinity, margin: EdgeInsets.symmetric(horizontal: 5.w), padding: EdgeInsets.all(10.h), decoration: BoxDecoration( color: Colors.white, boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), offset: Offset(0, 2), blurRadius: 4, spreadRadius: 1, ) ], borderRadius: BorderRadius.circular(6.r), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( S.of(context).chongzhi, style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 14.sp, color: Colors.black, ), ), SizedBox(height: 5.h), Text( S.of(context).chongzhifuliduo, style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, color: Color(0xff4D4D4D), ), ), ], ), ), Image.asset( "assets/image/home_recharge.webp", width: 21.w, height: 33.h, fit: BoxFit.fill, ), ], ), ), ), ), Expanded( child: GestureDetector( onTap: () { // Navigator.of(context).pushNamed('/router/roll_center_page'); Navigator.of(context).pushNamed('/router/welfare_page'); }, child: Container( width: double.infinity, margin: EdgeInsets.symmetric(horizontal: 5.w), padding: EdgeInsets.all(10.h), decoration: BoxDecoration( color: Colors.white, boxShadow: [ BoxShadow( color: Colors.black.withAlpha(12), offset: Offset(0, 2), blurRadius: 4, spreadRadius: 1, ) ], borderRadius: BorderRadius.circular(6.r), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( S.of(context).fulizhongxin, style: TextStyle( fontWeight: MyFontWeight.semi_bold, fontSize: 14.sp, color: Colors.black, ), ), SizedBox(height: 5.h), Text( S.of(context).tiantiandefuli, style: TextStyle( fontWeight: MyFontWeight.regular, fontSize: 12.sp, color: Color(0xff4D4D4D), ), ), ], ), ), Image.asset( "assets/image/home_welfare.webp", width: 22.w, height: 35.h, fit: BoxFit.fill, ), ], ), ), ), ), ], ), ); } }