feat(shared): legacy presentation/ + shared design system + widgets
- lib/presentation : pages legacy (explore/network, notifications) avec BLoC - lib/shared/design_system : UnionFlow Design System v2 (tokens, components) + MD3 tokens + module_colors par feature - lib/shared/widgets : widgets transversaux (core_card, core_shimmer, error_widget, loading_widget, powered_by_lions_dev, etc.) - lib/shared/constants + utils
This commit is contained in:
@@ -89,7 +89,7 @@ class UFCard extends StatelessWidget {
|
||||
|
||||
Widget content = Container(
|
||||
padding: effectivePadding,
|
||||
decoration: _getDecoration(effectiveBorderRadius),
|
||||
decoration: _getDecoration(effectiveBorderRadius, context),
|
||||
child: child,
|
||||
);
|
||||
|
||||
@@ -108,27 +108,31 @@ class UFCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
BoxDecoration _getDecoration(double radius) {
|
||||
BoxDecoration _getDecoration(double radius, BuildContext context) {
|
||||
final surfaceColor = Theme.of(context).colorScheme.surface;
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final effectiveBorderColor = borderColor ?? (isDark ? AppColors.borderDark : AppColors.border);
|
||||
|
||||
switch (style) {
|
||||
case UFCardStyle.elevated:
|
||||
return BoxDecoration(
|
||||
color: color ?? AppColors.lightSurface,
|
||||
color: color ?? surfaceColor,
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
);
|
||||
|
||||
case UFCardStyle.outlined:
|
||||
return BoxDecoration(
|
||||
color: color ?? AppColors.lightSurface,
|
||||
color: color ?? surfaceColor,
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
border: Border.all(
|
||||
color: borderColor ?? AppColors.lightBorder,
|
||||
color: effectiveBorderColor,
|
||||
width: borderWidth ?? 1.0,
|
||||
),
|
||||
);
|
||||
|
||||
case UFCardStyle.filled:
|
||||
return BoxDecoration(
|
||||
color: color ?? AppColors.lightSurface,
|
||||
color: color ?? surfaceColor,
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user