Select Git revision
game_player.dart
-
Benoît Harrault authoredBenoît Harrault authored
game_player.dart 992 B
import 'package:flutter/material.dart';
class GamePlayerWidget extends StatelessWidget {
const GamePlayerWidget({
super.key,
required this.active,
required this.seeds,
});
final bool active;
final int seeds;
@override
Widget build(BuildContext context) {
final Color baseColor = active ? Colors.pink : Theme.of(context).colorScheme.surface;
return Container(
margin: const EdgeInsets.all(2),
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
color: baseColor,
borderRadius: BorderRadius.circular(2),
border: Border.all(
color: baseColor,
width: 2,
),
),
width: 100,
height: 100,
child: Text(
seeds == 0 ? '' : seeds.toString(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 40,
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.primary,
),
),
);
}
}