brand_mark.dart 532 B

12345678910111213141516171819
  1. import 'package:flutter/material.dart';
  2. /// Renders the palm+droplet mark, picking the light- or dark-mode variant
  3. /// based on the current theme brightness.
  4. class BrandMark extends StatelessWidget {
  5. final double size;
  6. const BrandMark({super.key, this.size = 40});
  7. @override
  8. Widget build(BuildContext context) {
  9. final isDark = Theme.of(context).brightness == Brightness.dark;
  10. return Image.asset(
  11. isDark ? 'assets/icon_dark.png' : 'assets/icon_light.png',
  12. width: size,
  13. height: size,
  14. );
  15. }
  16. }