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