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:
dahoud
2026-04-15 20:27:23 +00:00
parent 744faa3a9c
commit 7cd7c6fc9e
36 changed files with 1890 additions and 837 deletions

View File

@@ -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),
);
}