fillter_button.dart 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import 'package:flutter/material.dart';
  2. import '../../wisdom_cli.dart';
  3. class WFilterButtons extends StatelessWidget {
  4. final double? width;
  5. final double? height;
  6. final double? spacing;
  7. final double? runspacing;
  8. final double? bRadius;
  9. final Widget child;
  10. final String? name;
  11. const WFilterButtons({
  12. Key? key,
  13. this.width,
  14. this.height,
  15. this.spacing,
  16. this.runspacing,
  17. this.bRadius,
  18. this.name,
  19. required this.child,
  20. });
  21. @override
  22. Widget build(BuildContext context) {
  23. return Wisdom.column(
  24. crossAxisAlignment: CrossAxisAlignment.stretch,
  25. children: [
  26. WisText(
  27. '${name ?? ''}',
  28. size: 16.pt,
  29. weight: FontWeight.bold,
  30. ).asPaddingSymmetric(vertical: 8.pt),
  31. ButtonTheme(
  32. minWidth: width ?? 100.pt,
  33. height: height ?? 39.pt,
  34. textTheme: ButtonTextTheme.accent,
  35. shape: RoundedRectangleBorder(
  36. borderRadius: BorderRadius.circular(15.pt),
  37. ),
  38. child: child,
  39. ),
  40. ],
  41. );
  42. }
  43. }