Flutter용 Moon Design System은 Moon Design System과 일치하는 통합된 테마 적용 가능하고 확장 가능한 위젯 모음을 제공합니다. 다양한 플랫폼 간 일관성을 위해 설계되어 Android, iOS, Web, macOS, Windows, Linux에서 시각적으로 통일된 애플리케이션을 개발할 수 있도록 합니다. 사용자 정의 테마 지원 및 간단한 pub 명령어를 통한 손쉬운 통합이 가능하며, 잘 문서화된 컴포넌트와 접근성 및 확장성에 중점을 두어 디자인 무결성을 유지하면서 UI 개발을 간소화합니다.
The current major release, v1.0.0, will be maintained as-is and will not receive further updates, except for patches. The v1 theming is based on the soon-to-be deprecated Moon Design Figma v1 and lacks flexibility. For greater control over theming with v1 of moon_flutter, it is recommended to create custom wrapper widgets around the moon_flutter widgets that align with your project's specific theming requirements.
There is ongoing background work for v2 which aims to be more modular, scalable and themable.
Declare tokens variable and optionally override values:
final lightTokens = MoonTokens.light.copyWith(
colors: MoonColors.light.copyWith(
piccolo: Colors.blue,
textPrimary: Colors.amber,
),
typography: MoonTypography.typography.copyWith(
heading: MoonTypography.typography.heading.apply(
// Using variable font and bumping down the font weight compared to the// baseline 600 for heading.
fontFamily: "DMSans",
fontWeightDelta: -1,
fontVariations: [constFontVariation('wght', 500)],
),
),
);
final lightTheme = ThemeData.light().copyWith(
extensions: <ThemeExtension<dynamic>>[MoonTheme(tokens: lightTokens)],
);