Skip to content
Snippets Groups Projects
Select Git revision
  • 48381f4007dd9278b2742c23b9b3a8867ca33ee8
  • master default protected
  • 61-upgrade-framework-and-dependencies
  • 42-improve-app-metadata
  • 17-improve-and-complete-offline-words-list-and-tips
  • 6-allow-translate-application
  • 9-improve-documentation
  • Release_1.10.0_44 protected
  • Release_1.9.2_43 protected
  • Release_1.9.1_42 protected
  • Release_1.9.0_41 protected
  • Release_1.8.0_40 protected
  • Release_1.7.0_39 protected
  • Release_1.6.0_38 protected
  • Release_1.5.2_37 protected
  • Release_1.5.1_36 protected
  • Release_1.5.0_35 protected
  • Release_1.4.1_34 protected
  • Release_1.4.0_33 protected
  • Release_1.3.2_32 protected
  • Release_1.3.1_31 protected
  • Release_1.3.0_30 protected
  • Release_1.2.18_29 protected
  • Release_1.2.17_28 protected
  • Release_1.2.16_27 protected
  • Release_1.2.15_26 protected
  • Release_1.2.14_25 protected
27 results

scores.dart

Blame
  • game.dart 2.86 KiB
    import 'package:flutter/material.dart';
    
    import '../provider/data.dart';
    import '../utils/game_utils.dart';
    
    class Game {
      static Container buildGameWidget(Data myProvider) {
        bool gameIsFinished = myProvider.isGameFinished();
    
        return Container(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              SizedBox(height: 8),
              Game.buildTopIndicatorWidget(myProvider),
              SizedBox(height: 2),
              Expanded(
                child: Text('GAME'),
              ),
              SizedBox(height: 2),
              Container(
                height: 150,
                width: double.maxFinite,
                child: gameIsFinished ? Game.buildEndGameMessage(myProvider) : Text('CONTROLS'),
              ),
            ],
          ),
        );
      }
    
      static Widget buildTopIndicatorWidget(Data myProvider) {
        return Table(
          children: [
            TableRow(
              children: [
                Column(children: [
                  Text(
                    'SCORE',
                    style: TextStyle(
                      fontSize: 40,
                      fontWeight: FontWeight.w600,
                      color: Colors.black,
                    ),
                  ),
                  Text(
                    'TARGET',
                    style: TextStyle(
                      fontSize: 15,
                      fontWeight: FontWeight.w600,
                      color: Colors.grey,
                    ),
                  ),
                ]),
                Column(children: [
                  Text(
                    'INFOS',
                    style: TextStyle(
                      fontSize: 20,
                      fontWeight: FontWeight.w600,
                      color: Colors.green,
                    ),
                  ),
                ]),
              ],
            ),
          ],
        );
      }