// widgets/brand_mark.dart — 品牌 logo 真相源(镜像原型 about.html hero SVG)。 // 原型 64×64 viewBox:rx15 深蓝底 #0F3057 + 白描边(4, round) 山形 // M14 33→23 16→32 25→41 16→50 33 + 横线 y41(x15–49) + 横线下居中红点 (32,48) r3 // #8B2331。品牌资产主题不变(原型 SVG 硬编码,不走主题 token)——勿改配色。 import 'package:flutter/material.dart'; class BrandMark extends StatelessWidget { final double size; const BrandMark({super.key, this.size = 62}); static const Color _bg = Color(0xFF0F3057); // ds-ignore: 品牌 logo 固定色(原型 SVG 硬编码,主题不变) static const Color _stroke = Colors.white; // ds-ignore: 品牌 logo 固定色(原型 SVG 硬编码,主题不变) static const Color _dot = Color(0xFF8B2331); // ds-ignore: 品牌 logo 固定色(原型 SVG 硬编码,主题不变) @override Widget build(BuildContext context) { return Container( width: size, height: size, decoration: BoxDecoration( color: _bg, // 原型 rx15/64 borderRadius: BorderRadius.circular(size * 15 / 64), ), child: CustomPaint(painter: _MarkPainter()), ); } } class _MarkPainter extends CustomPainter { @override void paint(Canvas canvas, Size size) { final s = size.width / 64; final stroke = Paint() ..color = BrandMark._stroke ..style = PaintingStyle.stroke ..strokeWidth = 4 * s ..strokeCap = StrokeCap.round ..strokeJoin = StrokeJoin.round; final mountain = Path() ..moveTo(14 * s, 33 * s) ..lineTo(23 * s, 16 * s) ..lineTo(32 * s, 25 * s) ..lineTo(41 * s, 16 * s) ..lineTo(50 * s, 33 * s); canvas.drawPath(mountain, stroke); canvas.drawLine(Offset(15 * s, 41 * s), Offset(49 * s, 41 * s), stroke); canvas.drawCircle( Offset(32 * s, 48 * s), 3 * s, Paint()..color = BrandMark._dot); } @override bool shouldRepaint(covariant CustomPainter oldDelegate) => false; }