section_header.dart 939 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:flutter/material.dart';
  2. import 'package:asr_client/theme/app_colors.dart';
  3. class SectionHeader extends StatelessWidget {
  4. const SectionHeader({super.key, required this.title, this.action});
  5. final String title;
  6. final String? action;
  7. @override
  8. Widget build(BuildContext context) {
  9. return Padding(
  10. padding: const EdgeInsets.fromLTRB(4, 16, 4, 8),
  11. child: Row(
  12. children: [
  13. Text(
  14. title,
  15. style: const TextStyle(
  16. fontSize: 13,
  17. fontWeight: FontWeight.w800,
  18. color: AppColors.ink,
  19. ),
  20. ),
  21. const Spacer(),
  22. if (action != null)
  23. Text(
  24. action!,
  25. style: const TextStyle(
  26. fontSize: 12,
  27. color: AppColors.app,
  28. fontWeight: FontWeight.w700,
  29. ),
  30. ),
  31. ],
  32. ),
  33. );
  34. }
  35. }