RoundButton.dart 830B

1234567891011121314151617181920212223242526
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. class RoundButton extends StatelessWidget {
  4. String text;
  5. VoidCallback? onPressed;
  6. RoundButton({Key? key, this.onPressed, required this.text}) : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return ElevatedButton(
  10. child: Text(text),
  11. style: ElevatedButton.styleFrom(
  12. primary: const Color(0xFFFF703B),
  13. textStyle: TextStyle(
  14. color: Colors.white, fontSize: 20.sp, letterSpacing: 5.sp),
  15. elevation: 0,
  16. minimumSize: Size(double.infinity, 49.w),
  17. shape: RoundedRectangleBorder(
  18. borderRadius: BorderRadius.all(Radius.circular(24.5.w)),
  19. )),
  20. onPressed: onPressed,
  21. );
  22. }
  23. }