Files
org.parres.whitenoise/lib/theme.dart
T
8e18dbce40 feat(theme): add centralized AppTypography system (#170)
* feat(theme): add centralized AppTypography system

- Add AppTypography ThemeExtension with all font size/weight variants
- Replace inline TextStyle definitions across screens and widgets
- Use context.typographyScaled for responsive font sizing
- Update wn_list_item and wn_tooltip to use new typography system
- Reduces code duplication and ensures consistent typography

* chore: remove comments from AppTypography

* refactor: inline single-use typography variables

Remove unnecessary typography variable declarations in files where
context.typographyScaled is only called once. Direct inline access
is cleaner for single-use cases.

* refactor(theme): remove fontFamily overrides and add size 10 typography

- Remove explicit fontFamily: 'Manrope' from all 42 TextStyle variants
  in AppTypography to allow theme-level font changes to propagate
- Add medium10, semiBold10, bold10 typography variants (fontSize: 10,
  height: 14/10, letterSpacing: 0.8)
- Remove redundant Builder widgets in WnSystemNotice and hoist
  typography lookup to build method scope
- Replace one-off fontSize: 10.sp overrides in WnMessageReactions
  with typography.medium10
- Add widget-level tests for AppTypographyExtension in theme_test.dart
- Add tests for size 10 typography styles

* fix(theme): scale letterSpacing in _scaleStyle for responsive typography

Apply .sp scaling to letterSpacing in addition to fontSize to ensure
letter spacing scales responsively across different device sizes.

* feat(widgetbook): add typography showcase to foundations

Display all 48 text style variants organized by size (96-10) with
Medium, SemiBold, and Bold weight variants. Each section shows specs
(font size, line height, letter spacing) and sample text.

* feat: replace missing TextStyle with typography

---------

Co-authored-by: josefinalliende <mariajosefinaalliende@gmail.com>
2026-02-04 14:57:55 +01:00

20 lines
503 B
Dart

import 'package:flutter/material.dart';
import 'theme/app_typography.dart';
import 'theme/semantic_colors.dart';
export 'theme/app_typography.dart';
export 'theme/semantic_colors.dart';
final lightTheme = ThemeData(
brightness: Brightness.light,
fontFamily: 'Manrope',
extensions: const [SemanticColors.light, AppTypography.instance],
);
final darkTheme = ThemeData(
brightness: Brightness.dark,
fontFamily: 'Manrope',
extensions: const [SemanticColors.dark, AppTypography.instance],
);