docs(client): 修订 pangolin_theme 字体注释(改本地打包后过时描述)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// · PangolinScheme — ThemeExtension(语义色映射 + light/dark 实例)
|
||||
// · PangolinContext — BuildContext 扩展
|
||||
// · PangolinFonts — 字族标签常量
|
||||
// · PangolinText — google_fonts 运行时字型
|
||||
// · PangolinText — 本地打包字型(生产 useBundled,离线;测试经 FontLoader)
|
||||
// · PangolinTheme — ThemeData 组装
|
||||
//
|
||||
// Usage:
|
||||
@@ -144,9 +144,10 @@ extension PangolinContext on BuildContext {
|
||||
}
|
||||
|
||||
/// ── Font families ───────────────────────────────────────────────────
|
||||
/// 生产用 google_fonts 运行时加载;测试态设 [useBundled]=true,改用本地
|
||||
/// FontLoader 注册的同名 family(避免 google_fonts 在无网/禁拉取时抛异常,
|
||||
/// 让 golden 截图回归可跑)。封装函数是 PangolinText/_build 的唯一字体入口。
|
||||
/// 生产用本地打包字体([useBundled]=true,pubspec fonts: 段,离线);保留的
|
||||
/// [useBundled]=false 分支走 google_fonts 运行时加载,仅作回退/对照。测试态由
|
||||
/// flutter_test_config 经 FontLoader 注册同名 family。封装函数是 PangolinText/
|
||||
/// _build 的唯一字体入口。
|
||||
class PangolinFonts {
|
||||
PangolinFonts._();
|
||||
static const display = 'Sora';
|
||||
@@ -188,9 +189,9 @@ class PangolinFonts {
|
||||
}
|
||||
|
||||
/// ── Type scale ──────────────────────────────────────────────────────
|
||||
/// Uses google_fonts for runtime font loading (no local ttf required).
|
||||
/// All PangolinText members are static getters (not const) so they can
|
||||
/// reference google_fonts, which registers fonts dynamically.
|
||||
/// Uses locally-bundled fonts via [PangolinFonts] (production `useBundled=true`,
|
||||
/// offline; tests register fonts via FontLoader). Members are static getters
|
||||
/// (not const) so they route through the [PangolinFonts] wrapper functions.
|
||||
class PangolinText {
|
||||
PangolinText._();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user