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.

176 lines
5.4 KiB

3 years ago
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';
import '../../generated/l10n.dart';
3 years ago
class UnionEntry extends StatefulWidget {
final Function goToOrder;
UnionEntry(this.goToOrder);
@override
State<StatefulWidget> createState() {
return _UnionEntry();
}
}
class _UnionEntry extends State<UnionEntry> {
ApiService? apiService;
3 years ago
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
height: 120.h,
width: double.infinity,
margin: EdgeInsets.only(
top: 14.h,
bottom: 10.h,
right: 9.w,
left: 9.w,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: GestureDetector(
onTap: () {
3 years ago
widget.goToOrder(1);
3 years ago
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(6.r),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_chi.webp",
fit: BoxFit.fill,
width: 53.w,
height: 52.h,
3 years ago
),
SizedBox(height: 8.h),
Text(
S.of(context).chijiankang,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
),
],
),
3 years ago
),
),
),
Expanded(
child: GestureDetector(
onTap: () {
3 years ago
widget.goToOrder(2);
3 years ago
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(6.r),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.fill,
width: 36.w,
height: 56.h,
3 years ago
),
SizedBox(height: 8.h),
Text(
S.of(context).hejiankang,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
),
],
),
),
),
),
Expanded(
child: GestureDetector(
onTap: () {
3 years ago
widget.goToOrder(3);
3 years ago
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
3 years ago
),
],
borderRadius: BorderRadius.circular(6.r),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_wan.webp",
fit: BoxFit.fill,
width: 58.w,
height: 52.h,
),
SizedBox(height: 8.h),
Text(
S.of(context).wanjiankang,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
),
],
),
),
),
),
],
),
);
3 years ago
}
}