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.

163 lines
5.2 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';
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);
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(
height: 150.h,
margin: EdgeInsets.only(bottom:15),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: (){
widget.goToOrder();
3 years ago
},
child: Container(
width: 106,
color: Colors.white,
3 years ago
margin: EdgeInsets.only(right:10),
3 years ago
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),
3 years ago
Expanded(child: Image.asset(
3 years ago
"assets/image/home_order.png",
width:70,
height:70,
3 years ago
),),
3 years ago
],
),
),
),
GestureDetector(
onTap: (){
3 years ago
Navigator.of(context).pushNamed('/router/recharge_page');
3 years ago
},
child: Container(
width: 106,
color: Colors.white,
3 years ago
margin: EdgeInsets.only(right:10),
3 years ago
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),
3 years ago
Expanded(child:Image.asset(
3 years ago
"assets/image/home_recharge.png",
width:70,
height:70,
3 years ago
),),
3 years ago
],
),
),
),
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/roll_center_page');
},
child:Container(
width: 106,
color: Colors.white,
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),
3 years ago
Expanded(child: Image.asset(
3 years ago
"assets/image/home_coupon.png",
width:70,
height:70,
3 years ago
), ),
3 years ago
],
),
),
),
],
),
);
}
}