Compare commits
3 Commits
astoica/fi
...
a174ffc7c2
| Author | SHA1 | Date | |
|---|---|---|---|
| a174ffc7c2 | |||
| e9362706a1 | |||
| 5c334577bf |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -41,8 +41,3 @@ app.*.map.json
|
|||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
|
||||||
# Firebase
|
|
||||||
lib/firebase_options.dart
|
|
||||||
android/app/google-services.json
|
|
||||||
firebase.json
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
// START: FlutterFire Configuration
|
|
||||||
id 'com.google.gms.google-services'
|
|
||||||
// END: FlutterFire Configuration
|
|
||||||
id "kotlin-android"
|
id "kotlin-android"
|
||||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||||
id "dev.flutter.flutter-gradle-plugin"
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ pluginManagement {
|
|||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "8.1.0" apply false
|
id "com.android.application" version "8.1.0" apply false
|
||||||
// START: FlutterFire Configuration
|
|
||||||
id "com.google.gms.google-services" version "4.3.15" apply false
|
|
||||||
// END: FlutterFire Configuration
|
|
||||||
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
|
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,50 +147,43 @@ class _SuperGameState extends State<SuperGame> {
|
|||||||
_showSubGameDialog(index);
|
_showSubGameDialog(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _turnText() => Text(
|
|
||||||
gameEnded()
|
|
||||||
? "${Util.stateText(winner)} Wins"
|
|
||||||
: "${Util.stateText(turn)}'s Turn",
|
|
||||||
style: const TextStyle(fontSize: 25),
|
|
||||||
);
|
|
||||||
|
|
||||||
Widget _subGmaeWidget(int i) {
|
|
||||||
if (subGameEnded(i)) {
|
|
||||||
return Text(
|
|
||||||
subGameWinner(i).name.toUpperCase(),
|
|
||||||
style: const TextStyle(fontSize: 40),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return TTCGame(turn: turn, data: data[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Widget> _generateCells() => Iterable.generate(data.length)
|
|
||||||
.map(
|
|
||||||
(i) => DecoratedBox(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: nextPlay == i ? Colors.lightGreenAccent : null,
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(15),
|
|
||||||
child: _subGmaeWidget(i),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
const Spacer(flex: 5),
|
const Spacer(flex: 5),
|
||||||
Center(
|
Center(
|
||||||
child: _turnText(),
|
child: Text(
|
||||||
|
gameEnded()
|
||||||
|
? "${Util.stateText(winner)} Wins"
|
||||||
|
: "${Util.stateText(turn)}'s Turn",
|
||||||
|
style: const TextStyle(fontSize: 25),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const Spacer(flex: 1),
|
const Spacer(flex: 1),
|
||||||
GameHash(
|
GameHash(
|
||||||
cellOnTapCallback: _cellOnTapCallback,
|
cellOnTapCallback: _cellOnTapCallback,
|
||||||
children: _generateCells(),
|
children: Iterable.generate(data.length)
|
||||||
),
|
.map(
|
||||||
|
(i) => DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: nextPlay == i ? Colors.lightGreenAccent : null,
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15),
|
||||||
|
child: !subGameEnded(i)
|
||||||
|
? TTCGame(
|
||||||
|
turn: turn,
|
||||||
|
data: data[i],
|
||||||
|
)
|
||||||
|
: Text(
|
||||||
|
subGameWinner(i).name.toUpperCase(),
|
||||||
|
style: const TextStyle(fontSize: 40),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList()),
|
||||||
const Spacer(flex: 5),
|
const Spacer(flex: 5),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user