added game status

This commit is contained in:
2024-02-04 19:14:41 +05:30
parent eda5f77e2d
commit 494b27bf9e
16 changed files with 691 additions and 137 deletions

View File

@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:rogapp/widgets/GameState/Colors.dart';
class LocationVisitedWidget extends StatelessWidget {
final int count;
final bool minimized;
const LocationVisitedWidget(
{Key? key, required this.count, this.minimized = false})
: super(key: key);
@override
Widget build(BuildContext context) {
if (minimized) {
return Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: JapaneseColors.mizu,
shape: BoxShape.circle,
),
child: Center(
child: Text(
'$count',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 14,
),
),
),
);
} else {
return Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8),
decoration: BoxDecoration(
color: JapaneseColors.matcha,
borderRadius: BorderRadius.circular(10),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.check_circle_outline, color: Colors.white, size: 24),
SizedBox(width: 8),
Text(
'$count チェックイン', // "X Check-ins" in Japanese
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16),
),
],
),
);
}
}
}