RoundButton.dart 829B

123456789101112131415161718192021222324252627282930
  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(color: Colors.white, fontSize: 20.sp, letterSpacing: 5.sp),
  14. elevation: 0,
  15. minimumSize: Size(double.infinity, 49.w),
  16. shape: RoundedRectangleBorder(
  17. borderRadius: BorderRadius.all(Radius.circular(24.5.w)),
  18. )
  19. ),
  20. onPressed: onPressed,
  21. );
  22. }
  23. }