M3 Overhaul
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// M3 Expressive status pill — uses tonal container colors with a
|
||||
/// smooth, spring-physics-inspired animation.
|
||||
class StatusPill extends StatelessWidget {
|
||||
const StatusPill({super.key, required this.label, this.isEmphasized = false});
|
||||
|
||||
@@ -11,23 +13,23 @@ class StatusPill extends StatelessWidget {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final background = isEmphasized
|
||||
? scheme.tertiaryContainer
|
||||
: scheme.tertiaryContainer.withValues(alpha: 0.65);
|
||||
: scheme.tertiaryContainer;
|
||||
final foreground = scheme.onTertiaryContainer;
|
||||
|
||||
return AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 220),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
duration: const Duration(milliseconds: 400),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: background,
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
border: Border.all(color: scheme.tertiary.withValues(alpha: 0.3)),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
),
|
||||
child: Text(
|
||||
label.toUpperCase(),
|
||||
style: Theme.of(context).textTheme.labelSmall?.copyWith(
|
||||
color: foreground,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0.4,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user