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