- 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
58 lines
1.6 KiB
Dart
58 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// UnionFlow Mobile - Composant DRY Centralisé : CoreCard
|
|
/// Le seul et unique conteneur d'affichage (Posts, Événements, Profils).
|
|
/// Design : Minimaliste Premium, Bordures ultra-fines, Ombre invisible mais présente.
|
|
class CoreCard extends StatelessWidget {
|
|
final Widget child;
|
|
final EdgeInsetsGeometry padding;
|
|
final EdgeInsetsGeometry margin;
|
|
final VoidCallback? onTap;
|
|
final Color? backgroundColor;
|
|
|
|
const CoreCard({
|
|
Key? key,
|
|
required this.child,
|
|
this.padding = const EdgeInsets.all(8.0),
|
|
this.margin = const EdgeInsets.only(bottom: 6.0),
|
|
this.onTap,
|
|
this.backgroundColor,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final scheme = Theme.of(context).colorScheme;
|
|
|
|
return Container(
|
|
width: double.infinity,
|
|
margin: margin,
|
|
decoration: BoxDecoration(
|
|
color: backgroundColor ?? scheme.surface,
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
border: Border.all(
|
|
color: scheme.outlineVariant.withOpacity(0.6),
|
|
width: 0.8,
|
|
),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: scheme.shadow.withOpacity(0.06),
|
|
blurRadius: 6,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
],
|
|
),
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: InkWell(
|
|
onTap: onTap,
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
child: Padding(
|
|
padding: padding,
|
|
child: child,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|