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.
 
 
 
 
 
 

215 lines
7.6 KiB

import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.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<StatefulWidget> createState() {
return _ShortcutOperation();
}
}
class _ShortcutOperation extends State<ShortcutOperation> {
ApiService apiService;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
height: 80.h,
width: double.infinity,
margin: EdgeInsets.only(bottom:15,left: 10,right: 10),
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, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(4),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"联盟",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
),
),
SizedBox(height:5.h),
Text(
"下单赚积分",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF4D4D4D),
),
),
],
),
SizedBox(width: 3.w),
Expanded(child: Image.asset(
"assets/image/home_lm.webp",
width:36,
height:36,
),),
],
),
),
) ),
Expanded(child:GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/recharge_page');
},
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, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(4),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"充值",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
),
),
SizedBox(height: 5),
Text(
"充值福利多",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF4D4D4D),
),
),
],
),
SizedBox(width: 3.w),
Expanded(child: Image.asset(
"assets/image/home_recharge.webp",
width:36,
height:36,
),),
],
),
),
), ),
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),
padding: EdgeInsets.all(10.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(4),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"福利中心",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
),
),
SizedBox(height: 5),
Text(
"天天得福利",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF4D4D4D),
),
),
],
),
SizedBox(width: 3.w),
Expanded(child: Image.asset(
"assets/image/home_welfare.webp",
width:36,
height:36,
),),
],
),
),
),),
],
),
);
}
}