11import 'dart:async' ;
22import 'package:numbers/schema/blackSchema.dart' ;
3+ import 'package:numbers/utils/constants.dart' ;
34import 'package:numbers/widgets/bgGradient.dart' ;
45import 'package:numbers/provider/BlockDataStream.dart' ;
56import 'package:numbers/widgets/targetBlockBuilder.dart' ;
@@ -28,7 +29,35 @@ class _GameScreenState extends State<GameScreen> {
2829 this .listenBlockChanges ();
2930 }
3031
31- void initTimer () {
32+ @override
33+ Widget build (BuildContext context) {
34+ return SafeArea (
35+ child: Scaffold (
36+ body: Container (
37+ height: double .infinity,
38+ decoration: bgBoxDecoration (),
39+ child: SingleChildScrollView (
40+ child: Column (
41+ children: < Widget > [
42+ SizedBox (
43+ height: 10 ,
44+ ),
45+ _headerInfo (),
46+ SizedBox (
47+ height: 10 ,
48+ ),
49+ buildTargetBlock (
50+ title: 'Target' , targetValue: this .blockSchema.target),
51+ buildNumberBlocks ()
52+ ],
53+ ),
54+ ),
55+ ),
56+ ),
57+ );
58+ }
59+
60+ void initTimer () {
3261 this .gameTimerObject = Timer .periodic (Duration (seconds: 1 ), (timer) {
3362 setState (() {
3463 this .secCounter-- ;
@@ -129,39 +158,14 @@ class _GameScreenState extends State<GameScreen> {
129158 this .blocks[selectedIndex].color = color;
130159 }
131160
132- @override
133- Widget build (BuildContext context) {
134- return SafeArea (
135- child: Scaffold (
136- body: Container (
137- decoration: bgBoxDecoration (),
138- child: Column (
139- children: < Widget > [
140- SizedBox (
141- height: 10 ,
142- ),
143- _headerInfo (),
144- SizedBox (
145- height: 10 ,
146- ),
147- buildTargetBlock (
148- title: 'Target' , targetValue: this .blockSchema.target),
149- buildNumberBlocks ()
150- ],
151- ),
152- ),
153- ),
154- );
155- }
156-
157161 Row _headerInfo () {
158162 return Row (
159163 mainAxisAlignment: MainAxisAlignment .center,
160164 children: < Widget > [
161165 Container (
162166 padding: const EdgeInsets .only (left: 15 , right: 10 ),
163167 width: 100 ,
164- color: Colors .red ,
168+ color: blackLowOpacity ,
165169 child: Row (
166170 children: < Widget > [
167171 Text (
@@ -181,7 +185,7 @@ class _GameScreenState extends State<GameScreen> {
181185 margin: const EdgeInsets .only (left: 10 ),
182186 padding: const EdgeInsets .only (left: 15 , right: 10 ),
183187 width: 100 ,
184- color: Colors .green ,
188+ color: blackLowOpacity ,
185189 child: Row (
186190 children: < Widget > [
187191 Text (
0 commit comments