Skip to content

Player Bar

Janina Krueger edited this page Jun 17, 2022 · 1 revision

Implement player bar with eff scores (Issue #91, #128)

[ef_score_bar.dart]

First implementation (Issue #91):
Bildschirmfoto_von_2022-05-29_17-56-57 Bildschirmfoto_von_2022-05-29_17-57-17 Bildschirmfoto_von_2022-05-29_17-57-29

Second implementation (Issue #128)
Bildschirmfoto_von_2022-06-02_17-35-35 Bildschirmfoto_von_2022-06-02_17-36-21

Third implementation (Issue #128)
Bildschirmfoto_von_2022-06-08_11-20-04

  • For the colorcoding of the efscore Flutters Rainbow Class is used.

  • Widget ButtonBar: Widget that builds the column with buttons for both permanent efscore bar and player changing popup. The list of Buttons is given as parameter and Flutters ListView Class is used to arrange them in a list.

  • Widget EfScoreBar: The main Widget representing the button ef-score bar with use of ButtonBar and builds all neccessary buttons for the player on field.

  • Function showPopup: Uses Flutters AlertDialog Class to open a Popup and ButtonBar to show the buttons. The function is called by pressing a button on ef-score bar or the plus button in the first popup.

  • Function buildPlayerButton: Returns a Container with a transparent TextButton und a Container which contains the layout as Obx Widget. Obx Widget means, that our state control library Get is used to change the buttons content after a global variable changed. Here it is needed to update the buttons after a player was changed. When pressing it, a popup menu opens.

  • Function buildPopupPlayerButton: Similar to buildPlayerButton but with the functionality of a popup button: When pressing it, a player is changed.

  • Function buildPlusButton: Builds the Plus-Button which is shown in the first popup after pressing a player. Pressing it, showPopup function is called and opens a popup with all players which are not on the field.

  • Function getButton: Returns a Container with the button layout for both player bar button and popup bar button.

Clone this wiki locally