import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; /// 操作按钮,包含2个按钮,左侧按钮固定,右侧按钮自适应 class ActionBtn extends StatelessWidget { /// 左侧按钮 final Widget leftBtn; /// 按钮之间的间隙组件 final Widget spaceWidget; /// 右侧按钮 final Widget rightBtn; const ActionBtn({ super.key, required this.leftBtn, required this.spaceWidget, required this.rightBtn, }); @override Widget build(BuildContext context) { return Row(children: [leftBtn, spaceWidget, Expanded(child: rightBtn)]); } }