Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

Commit 584f6e9

Browse files
committed
Merge remote-tracking branch 'origin/main'
# Conflicts: # lib/Match_Pages/match/EndGame.dart
2 parents 166e959 + 16ab71f commit 584f6e9

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

lib/Match_Pages/match/EndGame.dart

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:scouting_app/components/CheckBox.dart';
33
import 'package:scouting_app/components/QrGenerator.dart';
4-
// import 'package:scouting_app/components/gameSpecifics/Climb.dart';
4+
import 'package:scouting_app/components/gameSpecifics/climb.dart';
55
import 'package:scouting_app/main.dart';
66
import '../../components/slider.dart';
77
import '../../services/DataBase.dart';
@@ -19,6 +19,7 @@ class EndGameState extends State<EndGame> {
1919
late bool deep_climb;
2020
late bool shallow_climb;
2121
late bool park;
22+
int? selectedLevel;
2223

2324
late EndPoints endPoints;
2425

@@ -44,6 +45,13 @@ class EndGameState extends State<EndGame> {
4445
deep_climb = widget.matchRecord.endPoints.Deep_Climb;
4546
shallow_climb = widget.matchRecord.endPoints.Shallow_Climb;
4647
park = widget.matchRecord.endPoints.Park;
48+
if (deep_climb) {
49+
selectedLevel = 3;
50+
} else if (shallow_climb) {
51+
selectedLevel = 2;
52+
} else {
53+
selectedLevel = null;
54+
}
4755
commentController.text = widget.matchRecord.endPoints.Comments;
4856
neutralTrips = 0;
4957

@@ -52,6 +60,8 @@ class EndGameState extends State<EndGame> {
5260
}
5361

5462
void UpdateData() {
63+
deep_climb = selectedLevel == 3;
64+
shallow_climb = selectedLevel == 2;
5565
endPoints =
5666
EndPoints(deep_climb, shallow_climb, park, commentController.text);
5767
widget.matchRecord.endPoints.Deep_Climb = deep_climb;
@@ -108,7 +118,16 @@ class EndGameState extends State<EndGame> {
108118
},
109119
color: Colors.amber,
110120
),
111-
// buildClimbImage(),
121+
122+
buildClimbImage(selectedLevel, park, (int? newLevel) {
123+
setState(() {
124+
selectedLevel = newLevel;
125+
});
126+
park = newLevel == null;
127+
},
128+
),
129+
130+
112131
Container(
113132
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
114133
decoration: BoxDecoration(

0 commit comments

Comments
 (0)