Permalink
Browse files

doc: Strong-Mode support

  • Loading branch information...
MikeMitterer committed Nov 16, 2016
1 parent 8119264 commit 9d0430eef333e24003abfd8274a0ffe2446b4d24
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------------------
# Config for Analyzer
# More: https://pub.dartlang.org/packages/analyzer
#
# Analyzer options:
# https://www.dartlang.org/guides/language/analysis-options
#

analyzer:
strong-mode: true

# Exclude wegen https://github.com/dart-lang/sdk/issues/26420
# und https://github.com/dart-lang/test/issues/436
exclude:
- test/**
@@ -24,7 +24,7 @@ part of spaceinvaders;
/// final Painter painter = screen.painter;
/// spritefactory.tank.draw(painter);
class Painter {
final Logger _logger = new Logger('spaceinvaders.Painter');
static final Logger _logger = new Logger('spaceinvaders.Painter');

final dom.CanvasRenderingContext2D _context;
Painter(this._context);
@@ -83,7 +83,7 @@ class Painter {
///
/// }
class ImagePainter extends Painter {
final Logger _logger = new Logger('spaceinvaders.CityPainter');
static final Logger _logger = new Logger('spaceinvaders.CityPainter');

final dom.CanvasElement _canvas;

@@ -52,7 +52,8 @@ class SpaceInvadersStoreImpl extends Dispatcher implements SpaceInvadersStore {
emitChange();
});

on(GameStateAction.NAME).listen(( final GameStateAction action) {
on(GameStateAction.NAME)
.map((final Action action) => action as GameStateAction).listen(( final GameStateAction action) {
_gamestate = action.data;
switch(_gamestate) {
case GameState.YouWon:
@@ -73,7 +74,8 @@ class SpaceInvadersStoreImpl extends Dispatcher implements SpaceInvadersStore {
emitChange();
});

on(TankHitAction.NAME).listen((final TankHitAction action) {
on(TankHitAction.NAME)
.map((final Action action) => action as TankHitAction).listen((final TankHitAction action) {
_tanksLost = action.data;

_logger.info("Tanks lost: ${_tanksLost}");
@@ -10,12 +10,12 @@ environment:
dependencies:
browser: ^0.10.0

mdl: '>=1.0.0 <2.0.0'
mdl: ^1.0.0
#path: /Volumes/Daten/DevLocal/DevDart/MaterialDesignLite

logging: ^0.11.0
logging_handlers: ^0.8.0
console_log_handler: ^0.1.0
console_log_handler: ^0.2.0

di: ^3.3.0

@@ -6,7 +6,6 @@ import 'package:di/di.dart' as di;

import 'package:mdl/mdl.dart';

import 'package:spaceinvaders/components/interface/actions.dart';
import 'package:spaceinvaders/components/interface/stores.dart';

import 'package:spaceinvaders/components.dart';
@@ -2,7 +2,7 @@ import 'package:grinder/grinder.dart';

import 'package:path/path.dart' as path;

main(args) => grind(args);
main(final List<String> args) => grind(args);

@Task()
@Depends(genCss, test)

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

0 comments on commit 9d0430e

Please sign in to comment.