feat: 同步 design/ 设计系统(含 iPad tablet kit) + 架构任务拆分(todo/)
design/ 同步自最新设计导出,新增 ui_kits/tablet/ 平板分栏布局;todo/ 录入 18 个并行实施任务。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
// pangolin_logo.dart — 品牌标 / 字标 / App 图标(SVG)
|
||||
// 用 flutter_svg 加载 assets/ 下的矢量 logo,自动适配明暗主题。
|
||||
//
|
||||
// 依赖:pubspec.yaml
|
||||
// dependencies:
|
||||
// flutter_svg: ^2.0.0
|
||||
// flutter:
|
||||
// assets:
|
||||
// - assets/logo-mark.svg
|
||||
// - assets/logo-mark-white.svg
|
||||
// - assets/logo-wordmark.svg
|
||||
// - assets/app-icon.svg
|
||||
//
|
||||
// 资产路径:把本目录上一级的 assets/*.svg 拷进你的 Flutter 工程 assets/。
|
||||
// 若放在其他包/前缀下,改 _base 即可。
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../pangolin_theme.dart';
|
||||
|
||||
const String _base = 'assets';
|
||||
|
||||
/// 仅标记(行走穿山甲)。深色主题自动用反白版。
|
||||
class PangolinMark extends StatelessWidget {
|
||||
const PangolinMark({super.key, this.size = 28, this.forceLight, this.forceDark});
|
||||
final double size;
|
||||
final bool? forceLight; // 强制浅色锁版(clay 标)
|
||||
final bool? forceDark; // 强制深色锁版(反白标)
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = forceDark ?? (forceLight == true ? false : Theme.of(context).brightness == Brightness.dark);
|
||||
final asset = isDark ? '$_base/logo-mark-white.svg' : '$_base/logo-mark.svg';
|
||||
return SvgPicture.asset(asset, width: size, height: size);
|
||||
}
|
||||
}
|
||||
|
||||
/// 标记 + 字标(横版锁版)。深色下文字需反白时建议改用 PangolinMark + Text 自绘,
|
||||
/// 因 wordmark.svg 内文字为深色;此处提供浅背景用法。
|
||||
class PangolinWordmark extends StatelessWidget {
|
||||
const PangolinWordmark({super.key, this.height = 28});
|
||||
final double height;
|
||||
@override
|
||||
Widget build(BuildContext context) => SvgPicture.asset('$_base/logo-wordmark.svg', height: height);
|
||||
}
|
||||
|
||||
/// App 图标(clay 渐变圆角方 + 白色穿山甲)。圆角随尺寸。
|
||||
class PangolinAppIcon extends StatelessWidget {
|
||||
const PangolinAppIcon({super.key, this.size = 64});
|
||||
final double size;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(size * 0.22),
|
||||
child: SvgPicture.asset('$_base/app-icon.svg', width: size, height: size),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// 顶栏品牌锁版:标记 + 「穿山甲 / Pangolin」字样(用本地字体,随主题变色)。
|
||||
/// 比直接用 wordmark.svg 更灵活(可双语 + 深浅自适应)。
|
||||
class PangolinBrandLockup extends StatelessWidget {
|
||||
const PangolinBrandLockup({super.key, this.zh = true, this.markSize = 26});
|
||||
final bool zh; final double markSize;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final c = context.pangolin;
|
||||
return Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
PangolinMark(size: markSize),
|
||||
const SizedBox(width: 9),
|
||||
Text(zh ? '穿山甲' : 'Pangolin',
|
||||
style: PangolinText.h3.copyWith(color: c.fg1, fontFamily: PangolinFonts.display, fontWeight: FontWeight.w700)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user