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.

40 lines
1.1 KiB

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<CloudBottomButton> createState() => _CloudBottomButtonState();
}
class _CloudBottomButtonState extends State<CloudBottomButton> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap:widget.onTap,
child: Material(
color:Colors.transparent,
child: Container(
alignment: Alignment.center,
2 years ago
padding: EdgeInsets.symmetric(vertical: 10.w),
margin: EdgeInsets.symmetric(horizontal:16.w),
decoration:widget.decoration?? UserTool.myAppStyle.bottomButtonDecoration!,
child: Text(
widget.text,
style: UserTool.myAppStyle.bottomButtonText,
),
),
),
);
}
}