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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user