import 'package:flutter/material.dart'; import 'package:solitaire/provider/data.dart'; class TopIndicator extends StatelessWidget { const TopIndicator({super.key, required this.myProvider}); final Data myProvider; @override Widget build(BuildContext context) { final int allowedMovesCount = myProvider.allowedMovesCount; return Table( children: [ TableRow( children: [ Column( children: [ Text( '♟️ ${myProvider.remainingPegsCount}', style: const TextStyle( fontSize: 40, fontWeight: FontWeight.w600, color: Colors.black, ), ), ], ), Column( children: [ Text( allowedMovesCount.toString(), style: const TextStyle( fontSize: 20, fontWeight: FontWeight.w600, color: Colors.green, ), ), ], ), ], ), ], ); } }