menu_section_title.dart 994 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:flutter/widgets.dart';
  2. import 'package:photos/theme/ente_theme.dart';
  3. class MenuSectionTitle extends StatelessWidget {
  4. final String title;
  5. final IconData? iconData;
  6. const MenuSectionTitle({super.key, required this.title, this.iconData});
  7. @override
  8. Widget build(BuildContext context) {
  9. final colorScheme = getEnteColorScheme(context);
  10. return Padding(
  11. padding: const EdgeInsets.only(left: 8, top: 6, bottom: 6),
  12. child: Row(
  13. children: [
  14. iconData != null
  15. ? Icon(
  16. iconData,
  17. color: colorScheme.strokeMuted,
  18. size: 17,
  19. )
  20. : const SizedBox.shrink(),
  21. iconData != null ? const SizedBox(width: 8) : const SizedBox.shrink(),
  22. Text(
  23. title,
  24. style: getEnteTextTheme(context).small.copyWith(
  25. color: colorScheme.textMuted,
  26. ),
  27. )
  28. ],
  29. ),
  30. );
  31. }
  32. }