Commit 5aeff1ac authored by Adam Barth's avatar Adam Barth

Merge pull request #233 from abarth/fix_analyzer

Fix analyzer warnings
parents 3aa0437f 59798b98
...@@ -25,7 +25,6 @@ import 'package:sky/widgets/widget.dart'; ...@@ -25,7 +25,6 @@ import 'package:sky/widgets/widget.dart';
import 'fitness_types.dart'; import 'fitness_types.dart';
import 'fitness_item.dart'; import 'fitness_item.dart';
import 'measurement.dart'; import 'measurement.dart';
import 'meal.dart';
class FitnessItemList extends Component { class FitnessItemList extends Component {
FitnessItemList({ Key key, this.items, this.onDismissed }) : super(key: key); FitnessItemList({ Key key, this.items, this.onDismissed }) : super(key: key);
......
...@@ -12,7 +12,6 @@ import 'package:sky/widgets/material.dart'; ...@@ -12,7 +12,6 @@ import 'package:sky/widgets/material.dart';
import 'package:sky/widgets/navigator.dart'; import 'package:sky/widgets/navigator.dart';
import 'package:sky/widgets/scaffold.dart'; import 'package:sky/widgets/scaffold.dart';
import 'package:sky/widgets/scrollable_viewport.dart'; import 'package:sky/widgets/scrollable_viewport.dart';
import 'package:sky/widgets/snack_bar.dart';
import 'package:sky/widgets/theme.dart'; import 'package:sky/widgets/theme.dart';
import 'package:sky/widgets/tool_bar.dart'; import 'package:sky/widgets/tool_bar.dart';
......
...@@ -38,11 +38,6 @@ const List<TextStyle> textStyles = const <TextStyle>[ ...@@ -38,11 +38,6 @@ const List<TextStyle> textStyles = const <TextStyle>[
enum CellState { covered, exploded, cleared, flagged, shown } enum CellState { covered, exploded, cleared, flagged, shown }
class MineDiggerApp extends App { class MineDiggerApp extends App {
void initState() {
resetGame();
}
static const int rows = 9; static const int rows = 9;
static const int cols = 9; static const int cols = 9;
static const int totalMineCount = 11; static const int totalMineCount = 11;
...@@ -56,18 +51,8 @@ class MineDiggerApp extends App { ...@@ -56,18 +51,8 @@ class MineDiggerApp extends App {
// |uiState| keeps track of the visible player progess. // |uiState| keeps track of the visible player progess.
List<List<CellState>> uiState; List<List<CellState>> uiState;
Game(this.app) { void initState() {
randomSeed = 22; resetGame();
// Colors for each mine count:
// 0 - none, 1 - blue, 2-green, 3-red, 4-black, 5-dark red .. etc.
textStyles.add(new TextStyle(color: const Color(0xFF555555), fontWeight: bold));
textStyles.add(new TextStyle(color: const Color(0xFF0094FF), fontWeight: bold));
textStyles.add(new TextStyle(color: const Color(0xFF13A023), fontWeight: bold));
textStyles.add(new TextStyle(color: const Color(0xFFDA1414), fontWeight: bold));
textStyles.add(new TextStyle(color: const Color(0xFF1E2347), fontWeight: bold));
textStyles.add(new TextStyle(color: const Color(0xFF7F0037), fontWeight: bold));
textStyles.add(new TextStyle(color: const Color(0xFFE93BE9), fontWeight: bold));
initialize();
} }
void resetGame() { void resetGame() {
......
...@@ -183,8 +183,10 @@ class Dismissable extends AnimatedComponent { ...@@ -183,8 +183,10 @@ class Dismissable extends AnimatedComponent {
} }
Widget build() { Widget build() {
if (_resizePerformance != null) if (_resizePerformance != null) {
return new Container(height: _resizePerformance.variable.value); AnimatedValue<double> height = _resizePerformance.variable;
return new Container(height: height.value);
}
Matrix4 transform = new Matrix4.identity(); Matrix4 transform = new Matrix4.identity();
transform.translate(_position.value.x, _position.value.y); transform.translate(_position.value.x, _position.value.y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment