Files
app_fideliter/lib/widgets/pastille_points.dart
T
Mathew 1d3ee69c6d Initial commit — app fidélité magasin (tablette)
App Flutter de programme de fidélité : login staff, clients (nom/prénom),
scan QR, factures (€→points), récompenses, réglages. Backend Supabase
(schéma SQL + RLS anti-triche dans supabase/). Icône incluse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 21:37:06 +02:00

43 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import '../theme.dart';
import '../utils/format.dart';
/// Petite pastille colorée affichant un solde de points (ex : « 12,5 pts »).
class PastillePoints extends StatelessWidget {
final double valeur;
final bool grande;
const PastillePoints(this.valeur, {super.key, this.grande = false});
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: grande ? 16 : 12,
vertical: grande ? 8 : 5,
),
decoration: BoxDecoration(
color: AppTheme.accent.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(30),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.stars_rounded,
size: grande ? 22 : 16, color: AppTheme.accent),
const SizedBox(width: 6),
Text(
points(valeur),
style: TextStyle(
color: AppTheme.accent,
fontWeight: FontWeight.w700,
fontSize: grande ? 18 : 14,
),
),
],
),
);
}
}