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.
173 lines
5.6 KiB
173 lines
5.6 KiB
3 years ago
|
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 UnionEntry extends StatefulWidget {
|
||
|
final Function goToOrder;
|
||
|
|
||
|
UnionEntry(this.goToOrder);
|
||
|
|
||
|
@override
|
||
|
State<StatefulWidget> createState() {
|
||
|
return _UnionEntry();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class _UnionEntry extends State<UnionEntry> {
|
||
|
ApiService apiService;
|
||
|
|
||
|
@override
|
||
|
void initState() {
|
||
|
super.initState();
|
||
|
}
|
||
|
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Container(
|
||
|
height: 130.h,
|
||
|
width: double.infinity,
|
||
|
margin: EdgeInsets.only(bottom:10,left: 10,right: 10,top: 14.h),
|
||
|
child: Row(
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
Expanded(child:GestureDetector(
|
||
|
onTap: (){
|
||
|
widget.goToOrder();
|
||
|
},
|
||
|
child: Container(
|
||
|
width: double.infinity,
|
||
|
margin: EdgeInsets.symmetric(horizontal:5),
|
||
|
padding: EdgeInsets.symmetric(vertical:12.h),
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
boxShadow: [
|
||
|
BoxShadow(
|
||
|
color: Colors.black.withAlpha(12),
|
||
|
offset: Offset(0, 3),
|
||
|
blurRadius: 14,
|
||
|
spreadRadius: 0,
|
||
|
)
|
||
|
],
|
||
|
borderRadius: BorderRadius.circular(6),
|
||
|
),
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
Image.asset(
|
||
|
"assets/image/home_chi.webp",
|
||
|
fit: BoxFit.cover,
|
||
|
width: 60,
|
||
|
height: 60,
|
||
|
),
|
||
|
SizedBox(height:4.h),
|
||
|
Text(
|
||
|
"吃健康",
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.medium,
|
||
|
fontSize: 15.sp,
|
||
|
color: Color(0xFF0D0D0D),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
) ),
|
||
|
Expanded(child:GestureDetector(
|
||
|
onTap: (){
|
||
|
widget.goToOrder();
|
||
|
},
|
||
|
child: Container(
|
||
|
width: double.infinity,
|
||
|
margin: EdgeInsets.symmetric(horizontal:5),
|
||
|
// padding: EdgeInsets.symmetric(vertical:12.h),
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
boxShadow: [
|
||
|
BoxShadow(
|
||
|
color: Colors.black.withAlpha(12),
|
||
|
offset: Offset(0, 3),
|
||
|
blurRadius: 14,
|
||
|
spreadRadius: 0,
|
||
|
)
|
||
|
],
|
||
|
borderRadius: BorderRadius.circular(6),
|
||
|
),
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
Image.asset(
|
||
|
"assets/image/home_he.webp",
|
||
|
fit: BoxFit.cover,
|
||
|
width: 60,
|
||
|
height: 60,
|
||
|
),
|
||
|
SizedBox(height:4.h),
|
||
|
Text(
|
||
|
"喝健康",
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.medium,
|
||
|
fontSize: 15.sp,
|
||
|
color: Color(0xFF0D0D0D),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
) ),
|
||
|
Expanded(child: GestureDetector(
|
||
|
onTap: (){
|
||
|
widget.goToOrder();
|
||
|
},
|
||
|
child: Container(
|
||
|
width: double.infinity,
|
||
|
margin: EdgeInsets.symmetric(horizontal:5),
|
||
|
padding: EdgeInsets.symmetric(vertical:12.h),
|
||
|
decoration: BoxDecoration(
|
||
|
color: Colors.white,
|
||
|
boxShadow: [
|
||
|
BoxShadow(
|
||
|
color: Colors.black.withAlpha(12),
|
||
|
offset: Offset(0, 3),
|
||
|
blurRadius: 14,
|
||
|
spreadRadius: 0,
|
||
|
)
|
||
|
],
|
||
|
borderRadius: BorderRadius.circular(6),
|
||
|
),
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
Image.asset(
|
||
|
"assets/image/home_wan.webp",
|
||
|
fit: BoxFit.cover,
|
||
|
width: 60,
|
||
|
height: 60,
|
||
|
),
|
||
|
SizedBox(height:4.h),
|
||
|
Text(
|
||
|
"玩健康",
|
||
|
style: TextStyle(
|
||
|
fontWeight: MyFontWeight.medium,
|
||
|
fontSize: 15.sp,
|
||
|
color: Color(0xFF0D0D0D),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
)),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|