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.
195 lines
6.4 KiB
195 lines
6.4 KiB
import 'package:dio/dio.dart'; |
|
import 'package:flutter/cupertino.dart'; |
|
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/generated/l10n.dart'; |
|
import 'package:huixiang/retrofit/data/activity.dart'; |
|
import 'package:huixiang/retrofit/data/base_data.dart'; |
|
import 'package:huixiang/retrofit/data/page.dart'; |
|
import 'package:huixiang/retrofit/retrofit_api.dart'; |
|
import 'package:huixiang/utils/font_weight.dart'; |
|
import 'package:huixiang/view_widget/item_title.dart'; |
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
import 'package:shared_preferences/shared_preferences.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: 150.h, |
|
margin: EdgeInsets.only(bottom:15,left: 16,right: 16), |
|
child: Row( |
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
mainAxisAlignment: MainAxisAlignment.center, |
|
children: [ |
|
Expanded(child:GestureDetector( |
|
onTap: (){ |
|
widget.goToOrder(); |
|
}, |
|
child: Container( |
|
width: 106, |
|
decoration: BoxDecoration( |
|
color: Colors.white, |
|
boxShadow: [ |
|
BoxShadow( |
|
color: Colors.black.withAlpha(12), |
|
offset: Offset(0, 3), |
|
blurRadius: 14, |
|
spreadRadius: 0, |
|
) |
|
], |
|
borderRadius: BorderRadius.circular(4), |
|
), |
|
margin: EdgeInsets.only(right:10), |
|
padding: EdgeInsets.only(top: 8,bottom: 8), |
|
child: Column( |
|
children: [ |
|
Text( |
|
"现在下单", |
|
style: TextStyle( |
|
fontWeight: MyFontWeight.semi_bold, |
|
fontSize: 15.sp, |
|
color: Colors.black, |
|
), |
|
), |
|
SizedBox(height: 5), |
|
Text( |
|
"美味等你来!", |
|
style: TextStyle( |
|
fontWeight: MyFontWeight.regular, |
|
fontSize: 12.sp, |
|
color: Colors.black, |
|
), |
|
), |
|
SizedBox(height: 20), |
|
Expanded(child: Image.asset( |
|
"assets/image/home_order.webp", |
|
width:70, |
|
height:70, |
|
),), |
|
], |
|
), |
|
), |
|
) ), |
|
Expanded(child:GestureDetector( |
|
onTap: (){ |
|
Navigator.of(context).pushNamed('/router/recharge_page'); |
|
}, |
|
child: Container( |
|
width: 106, |
|
decoration: BoxDecoration( |
|
color: Colors.white, |
|
boxShadow: [ |
|
BoxShadow( |
|
color: Colors.black.withAlpha(12), |
|
offset: Offset(0, 3), |
|
blurRadius: 14, |
|
spreadRadius: 0, |
|
) |
|
], |
|
borderRadius: BorderRadius.circular(4), |
|
), |
|
margin: EdgeInsets.only(right:10), |
|
padding: EdgeInsets.only(top: 8,bottom: 8), |
|
child: Column( |
|
children: [ |
|
Text( |
|
"平台储值", |
|
style: TextStyle( |
|
fontWeight: MyFontWeight.semi_bold, |
|
fontSize: 15.sp, |
|
color: Colors.black, |
|
), |
|
), |
|
SizedBox(height: 5), |
|
Text( |
|
"会员享有赠送!", |
|
style: TextStyle( |
|
fontWeight: MyFontWeight.regular, |
|
fontSize: 12.sp, |
|
color: Colors.black, |
|
), |
|
), |
|
SizedBox(height: 20), |
|
Expanded(child:Image.asset( |
|
"assets/image/home_recharge.webp", |
|
width:70, |
|
height:70, |
|
),), |
|
], |
|
), |
|
), |
|
), ), |
|
Expanded(child: GestureDetector( |
|
onTap: (){ |
|
Navigator.of(context).pushNamed('/router/roll_center_page'); |
|
}, |
|
child:Container( |
|
width: 106, |
|
decoration: BoxDecoration( |
|
color: Colors.white, |
|
boxShadow: [ |
|
BoxShadow( |
|
color: Colors.black.withAlpha(12), |
|
offset: Offset(0, 3), |
|
blurRadius: 14, |
|
spreadRadius: 0, |
|
) |
|
], |
|
borderRadius: BorderRadius.circular(4), |
|
), |
|
padding: EdgeInsets.only(top: 8,bottom: 8), |
|
child: Column( |
|
children: [ |
|
Text( |
|
"天天有劵", |
|
style: TextStyle( |
|
fontWeight: MyFontWeight.semi_bold, |
|
fontSize: 15.sp, |
|
color: Colors.black, |
|
), |
|
), |
|
SizedBox(height: 5), |
|
Text( |
|
"来领超值好劵!", |
|
style: TextStyle( |
|
fontWeight: MyFontWeight.regular, |
|
fontSize: 12.sp, |
|
color: Colors.black, |
|
), |
|
), |
|
SizedBox(height: 20), |
|
Expanded(child: Image.asset( |
|
"assets/image/home_coupon.webp", |
|
width:70, |
|
height:70, |
|
), ), |
|
|
|
], |
|
), |
|
), |
|
),), |
|
], |
|
), |
|
); |
|
} |
|
|
|
}
|
|
|