action_btn.dart 552 B

1234567891011121314151617181920
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. /// 操作按钮,包含2个按钮,左侧按钮固定,右侧按钮自适应
  4. class ActionBtn extends StatelessWidget {
  5. /// 左侧按钮
  6. final Widget leftBtn;
  7. /// 右侧按钮
  8. final Widget rightBtn;
  9. const ActionBtn({super.key, required this.leftBtn, required this.rightBtn});
  10. @override
  11. Widget build(BuildContext context) {
  12. return Row(
  13. children: [leftBtn, SizedBox(width: 10.w), Expanded(child: rightBtn)],
  14. );
  15. }
  16. }