import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; class ProfitIndicator extends StatelessWidget { final double profit; const ProfitIndicator({super.key, required this.profit}); @override Widget build(BuildContext context) { return Container( margin: const EdgeInsets.fromLTRB(0, 0, 20, 0), padding: const EdgeInsets.fromLTRB(10, 5, 10, 5), decoration: BoxDecoration( color: Colors.blue, borderRadius: BorderRadius.circular(5) ), child: Text( "Profit ${NumberFormat('#####00.00 €', 'fr_FR').format(profit)}", style: TextStyle( fontFamily: 'NovaMono', fontSize: 20, fontWeight: FontWeight.w500, color: profit > 0 ? const Color.fromARGB(255, 0, 255, 8) : Colors.red ), ) ); } }