import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import '../Pay/PayPage.dart'; class HomeBottomMenuWidget extends StatefulWidget { const HomeBottomMenuWidget({Key? key}) : super(key: key); @override State createState() => _HomePageState(); } class _HomePageState extends State { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return SizedBox( width: double.infinity, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, children: [ Container( width: MediaQuery.of(context).size.width, padding: EdgeInsets.all(20), decoration: BoxDecoration( boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.07999999821186066), offset: Offset(0, -4), blurRadius: 4)], color: Color.fromRGBO(255, 255, 255, 1), ), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ InkWell( child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Container( height: 35, width: 35, child: Image( image: AssetImage('images/home/1.home.png'), fit: BoxFit.cover, ), ), Text( "หน้าหลัก".tr(), textAlign: TextAlign.center, style: TextStyle( color: Color(0xff65676b), fontSize: 12, ), ) ], ), onTap: () { Navigator.popUntil(context, ModalRoute.withName('/')); Navigator.pushNamed(context, '/HomePage'); }, ), InkWell( child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Container( height: 35, width: 35, child: Image( image: AssetImage('images/home/2.scan.png'), fit: BoxFit.cover, ), ), Text( "สแกน".tr(), textAlign: TextAlign.center, style: TextStyle( color: Color(0xff65676b), fontSize: 12, ), ) ], ), onTap: () { Navigator.popUntil(context, ModalRoute.withName('/')); Navigator.pushNamed(context, '/HomePage'); showModalBottomSheet( context: context, isScrollControlled: true, useSafeArea: true, builder: (BuildContext context) { return PayPage(); }); }, ), InkWell( onTap: () { // clearProfile(); }, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Container( height: 35, width: 35, child: Image( image: AssetImage('images/home/3.all.png'), fit: BoxFit.cover, ), ), Text( "ทั้งหมด".tr(), textAlign: TextAlign.center, style: TextStyle( color: Color(0xff65676b), fontSize: 12, ), ) ], ), ), ], ), ), ], ), ); } }