Skip to content

score_keeping

Janina Krueger edited this page Jul 7, 2022 · 3 revisions

Score Keeping (Issue #213)

Bildschirmfoto_von_2022-07-07_17-16-24
Bildschirmfoto_von_2022-07-07_17-16-40

Logic To track the score, the parameters _ownScore and _opponentScore are added to TempControllers together with getter, setter, incrementer and decrementer. Each place, where a goal was taken (in playerMenu and 7mMenu and goalkeeper actions), those functions are used.

UI The ui is implemented in score_keeping.dart. There is the Widget ScoreKeeping which builds the score on the main screen. The white Score field is actually a button where you can click and a popup menu opens to edit the score manually. This consists of TextButtons with + and - to add or remove just one goal. To manually enter the score, the score is written in a TextField. When an integer is given to this field, the score changes to this number. Otherwise nothing happens.
To close the menu, you just have to click outside.

Clone this wiki locally