mirror of
https://github.com/we-promise/sure.git
synced 2026-07-15 22:35:19 +00:00
On screens not yet redesigned with SureColors (the Chats list, etc.), Material's primary/secondary *container* roles were unset, so they fell back to defaults that read as blue on the FAB, unread-badge, and avatar surfaces. - Pin `primaryContainer`/`secondaryContainer` to a neutral Sure surface (`surfaceInset` + `textPrimary`), and add a `FloatingActionButtonThemeData` so FABs use Sure's neutral primary action color (`buttonPrimary`). `primary` / `secondary` stay `link` / `info`, so existing link/accent callers are unchanged. - Add a `SureLogo` widget that renders `logomark.svg` with the wordmark's `currentColor` strokes tinted to the theme's secondary text color, and route every logomark consumer (nav bar, login) through it — so the mark stays legible in dark mode (the hardcoded grey was too dim) and no caller renders the strokes as the flutter_svg default (black). The green brand mark keeps its fill. Refs #2235.
32 lines
1004 B
Dart
32 lines
1004 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import '../theme/sure_colors.dart';
|
|
|
|
/// The Sure wordmark logomark.
|
|
///
|
|
/// The wordmark's muted strokes are `currentColor` in the asset; this widget
|
|
/// tints them with the theme's secondary text color so the mark stays legible in
|
|
/// both light and dark (a hardcoded grey was too dim on the dark surface), while
|
|
/// the green brand mark keeps its own fill. Use this everywhere the logomark is
|
|
/// shown so no caller renders the `currentColor` strokes as the flutter_svg
|
|
/// default (black).
|
|
class SureLogo extends StatelessWidget {
|
|
const SureLogo({super.key, this.size = 36});
|
|
|
|
/// Square edge length in logical pixels.
|
|
final double size;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SvgPicture.asset(
|
|
'assets/images/logomark.svg',
|
|
width: size,
|
|
height: size,
|
|
theme: SvgTheme(
|
|
currentColor: SureColors.of(context).palette.textSecondary,
|
|
),
|
|
);
|
|
}
|
|
}
|