forked from mirrors/material_3_expressive
Add initial configuration, tokens, and widgets for M3E components
- Introduced `.gitignore` and `.metadata` for apps and examples. - Added Flutter/Dart analysis configurations (`analysis_options.yaml`). - Implemented foundational tokens and themes for M3E (colors, shapes). - Created base implementations for `IconButtonM3E` and `SplitButtonM3E`. - Set up CI workflow (`ci.yaml`) to automate testing and analysis.
This commit is contained in:
parent
2c0f2df0b8
commit
62ecb86b76
184 changed files with 9872 additions and 0 deletions
37
packages/m3e_design/lib/tokens/spacing_tokens.dart
Normal file
37
packages/m3e_design/lib/tokens/spacing_tokens.dart
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
@immutable
|
||||
class M3ESpacing {
|
||||
final double xs; // 4
|
||||
final double sm; // 8
|
||||
final double md; // 12
|
||||
final double lg; // 16
|
||||
final double xl; // 24
|
||||
final double xxl; // 32
|
||||
|
||||
const M3ESpacing({
|
||||
required this.xs,
|
||||
required this.sm,
|
||||
required this.md,
|
||||
required this.lg,
|
||||
required this.xl,
|
||||
required this.xxl,
|
||||
});
|
||||
|
||||
const M3ESpacing.regular()
|
||||
: xs = 4,
|
||||
sm = 8,
|
||||
md = 12,
|
||||
lg = 16,
|
||||
xl = 24,
|
||||
xxl = 32;
|
||||
|
||||
static M3ESpacing lerp(M3ESpacing a, M3ESpacing b, double t) => M3ESpacing(
|
||||
xs: a.xs + (b.xs - a.xs) * t,
|
||||
sm: a.sm + (b.sm - a.sm) * t,
|
||||
md: a.md + (b.md - a.md) * t,
|
||||
lg: a.lg + (b.lg - a.lg) * t,
|
||||
xl: a.xl + (b.xl - a.xl) * t,
|
||||
xxl: a.xxl + (b.xxl - a.xxl) * t,
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue