提交 499a13c5 编写于 作者: A Adam Barth

Fix analyzer warnings

 - Remove unused imports
 - Remove unused, broken constructor for MineDiggerApp
上级 23064abc
......@@ -25,7 +25,6 @@ import 'package:sky/widgets/widget.dart';
import 'fitness_types.dart';
import 'fitness_item.dart';
import 'measurement.dart';
import 'meal.dart';
class FitnessItemList extends Component {
FitnessItemList({ Key key, this.items, this.onDismissed }) : super(key: key);
......
......@@ -12,7 +12,6 @@ import 'package:sky/widgets/material.dart';
import 'package:sky/widgets/navigator.dart';
import 'package:sky/widgets/scaffold.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/tool_bar.dart';
......
......@@ -38,11 +38,6 @@ const List<TextStyle> textStyles = const <TextStyle>[
enum CellState { covered, exploded, cleared, flagged, shown }
class MineDiggerApp extends App {
void initState() {
resetGame();
}
static const int rows = 9;
static const int cols = 9;
static const int totalMineCount = 11;
......@@ -56,18 +51,8 @@ class MineDiggerApp extends App {
// |uiState| keeps track of the visible player progess.
List<List<CellState>> uiState;
Game(this.app) {
randomSeed = 22;
// 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 initState() {
resetGame();
}
void resetGame() {
......
......@@ -183,8 +183,10 @@ class Dismissable extends AnimatedComponent {
}
Widget build() {
if (_resizePerformance != null)
return new Container(height: _resizePerformance.variable.value);
if (_resizePerformance != null) {
AnimatedValue<double> height = _resizePerformance.variable;
return new Container(height: height.value);
}
Matrix4 transform = new Matrix4.identity();
transform.translate(_position.value.x, _position.value.y);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册