BM

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

807 stars 품질 70 트렌드 42BSD-3-Clause

Flutter를 위한 스타일링 시스템

개요

Type-safe styling for Flutter, 스타일 정의는 위젯 구조에서 분리. - Styler → Spec → Widget : 유형의 스타일은 위젯 렌더링 데이터로 해결합니다. - 스타일은 값입니다 : 유창한 방법은 새로운 병합 스타일을 반환하므로 기본은 재사용 될 수 있습니다. - 버퍼 값 : 콘크리트 값, 토큰 및 믹스 값은 컨텍스트로 해결; 일반 값은 대체, 믹스 값은 현명하게 축적. - - - 토큰 이름 값: MixScope 공급; ContextToken은 기본값을 계산할 수 있습니다. - Variants는 조건 패치입니다. 상태 의존 패치는 각 우선 그룹 내에서 보존 된 선언 순서와 함께 더 높은 우선권을 가지고 있습니다. - Modifiers wrap 위젯; 지시는 해상도 또는 렌더링 중 값을 변환합니다. - 생기는 해결된 specs를 interpolates: implicit, 단계, 및 keyframe 형태 형태 형태. - Annotations는 스타일 레시피에서 유형의 배관 및 위젯을 생성합니다. 의사 결정 로그는 이러한 개념 뒤에 경계 및 거래가 설명합니다.

개요(AI 번역)

Type-safe styling for Flutter, 스타일 정의는 위젯 구조에서 분리.

· 문서 · BSD 3 라이센스

핵심 개념

  • Styler → Spec → Widget : 유형의 스타일은 위젯 렌더링 데이터로 해결합니다.
  • 스타일은 값입니다 : 유창한 방법은 새로운 병합 스타일을 반환하므로 기본은 재사용 될 수 있습니다.
  • 버퍼 값 : 콘크리트 값, 토큰 및 혼합 값은 컨텍스트로 해결; 일반 값 대신, Mix 값은 fieldwise를 축적하는 동안.
  • 토큰 이름 값: MixScope은 공급한다; ContextToken는 기본값을 계산할 수 있다.
  • Variants는 조건 패치입니다 : 상태 의존 패치가 더 높은 우선 순위가 있습니다. 각 우선순위 그룹 내에서 보존되는 선언 순서.
  • Modifiers wrap 위젯; 지시는 해상도 또는 렌더링 중 값을 변환합니다.
  • 생기는 해결된 specs를 interpolates: implicit, 단계, 및 keyframe 형태 형태 형태.
  • Annotations는 스타일 레시피에서 유형의 배관 및 위젯을 생성합니다.

결정 로그는 경계를 설명합니다. 이 개념 뒤에 무역. 총알은 모델을 설명합니다; 로그 선택을 재방문하는 이유를 보존합니다.

시작

현재 소스는 Dart 3.12 + 및 플루트 3.44 +를 요구합니다; 체크

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Mix

Type-safe styling for Flutter, with style definitions separate from widget structure.

Package · Documentation · BSD 3-Clause license

Core concepts

  • Styler → Spec → Widget: a typed style resolves to data that a widget renders.
  • Styles are values: fluent methods return new merged styles, so bases can be reused.
  • Props defer values: concrete values, tokens, and Mix values resolve with context; plain values replace, while Mix values accumulate fieldwise.
  • Tokens name values: MixScope supplies them; ContextToken can compute a default.
  • Variants are conditional patches: state-dependent patches have higher priority, with declaration order preserved within each priority group.
  • Modifiers wrap widgets; directives transform values during resolution or rendering.
  • Animation interpolates resolved specs: implicit, phase, and keyframe modes.
  • Annotations generate typed plumbing and widgets from style recipes.

The decision log explain the boundaries and tradeoffs behind these concepts. The bullets describe the model; the log preserves reasons to revisit a choice.

Start

flutter pub add mix

Current sources require Dart 3.12+ and Flutter 3.44+; check the package manifest for the version you use.

import 'package:flutter/material.dart';
import 'package:mix/mix.dart';

final cardStyle = BoxStyler()
    .size(240, 100)
    .color(Colors.blue)
    .alignment(.center)
    .borderRadius(.circular(12));

final card = Box(
  style: cardStyle,
  child: StyledText(
    'Hello Mix',
    style: TextStyler().color(Colors.white).fontSize(18),
  ),
);

Packages

Package Purpose
mix Styling, tokens, variants, animation and layout
mix_annotations Code-generation annotations
mix_generator build_runner generators
mix_lint Mix analyzer rules
mix_protocol JSON contract, codecs and schemas
mix_winds Tailwind utility compiler and Flutter widgets
mix_chart Line, bar and pie charts
mix_chart_protocol Optional chart JSON vocabulary

Examples and guides

GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add btwld/mix
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →