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'; import '../../generated/l10n.dart'; class UnionEntry extends StatefulWidget { final Function goToOrder; UnionEntry(this.goToOrder); @override State createState() { return _UnionEntry(); } } class _UnionEntry extends State { ApiService apiService; @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return Container( height: 130.h, width: double.infinity, margin: EdgeInsets.all(14.h), 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: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Expanded(child:GestureDetector( onTap: (){ widget.goToOrder(1); }, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( "assets/image/home_chi.webp", fit: BoxFit.cover, width: 60.w, height: 60.h, ), SizedBox(height:4.h), Text( S.of(context).chijiankang, style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 15.sp, color: Color(0xFF0D0D0D), ), ), ], ), ) ), Expanded(child:GestureDetector( onTap: (){ widget.goToOrder(2); }, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( "assets/image/home_he.webp", fit: BoxFit.cover, width: 60.w, height: 60.h, ), SizedBox(height:4.h), Text( S.of(context).hejiankang, style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 15.sp, color: Color(0xFF0D0D0D), ), ), ], ), ) ), Expanded(child: GestureDetector( onTap: (){ widget.goToOrder(3); }, child:Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( "assets/image/home_wan.webp", fit: BoxFit.cover, width: 60.w, height: 60.h, ), SizedBox(height:4.h), Text( S.of(context).wanjiankang, style: TextStyle( fontWeight: MyFontWeight.medium, fontSize: 15.sp, color: Color(0xFF0D0D0D), ), ), ], ), )), ], ), ); } }