height_button.dart 868 B

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:flutter/material.dart';
  2. class HeightButton extends StatelessWidget {
  3. final Color? shadowColor;
  4. final Color? backgroundColor;
  5. final String txt;
  6. final Color? txtColor;
  7. final VoidCallback? onPressed;
  8. const HeightButton(
  9. {Key? key,
  10. this.shadowColor,
  11. this.backgroundColor,
  12. required this.txt,
  13. this.txtColor,
  14. this.onPressed})
  15. : super(key: key);
  16. @override
  17. Widget build(BuildContext context) {
  18. return SizedBox(
  19. height: 60,
  20. child: OutlinedButton(
  21. style: ButtonStyle(
  22. shadowColor: MaterialStateProperty.all(shadowColor),
  23. backgroundColor: MaterialStateProperty.all(backgroundColor)),
  24. onPressed: onPressed,
  25. child: Text(
  26. txt,
  27. style: const TextStyle(
  28. fontSize: 18,
  29. ),
  30. ),
  31. ),
  32. );
  33. }
  34. }