You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
7.9 KiB

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