import 'package:cloud_car_internal/utils/user_tool.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class CloudBottomButton extends StatefulWidget { final String text; final BoxDecoration? decoration; final Function() onTap; const CloudBottomButton({ super.key, this.text = '返回首页', required this.onTap, this.decoration, }); @override State createState() => _CloudBottomButtonState(); } class _CloudBottomButtonState extends State { @override Widget build(BuildContext context) { return GestureDetector( onTap:widget.onTap, child: Material( color:Colors.transparent, child: Container( alignment: Alignment.center, padding: EdgeInsets.symmetric(vertical: 15.w), margin: EdgeInsets.symmetric(horizontal: 32.w), decoration:widget.decoration?? UserTool.myAppStyle.bottomButtonDecoration!, child: Text( widget.text, style: UserTool.myAppStyle.bottomButtonText, ), ), ), ); } }