formating and fixing warnings

This commit is contained in:
Luan Nico
2019-02-09 12:06:59 -02:00
parent 985c403f8b
commit bd51364400
5 changed files with 11 additions and 10 deletions

View File

@ -61,8 +61,8 @@ class Animation {
int amount, {
double textureX = 0.0,
double textureY = 0.0,
double textureWidth = null,
double textureHeight = null,
double textureWidth,
double textureHeight,
double stepTime = 0.1,
}) {
this.frames = new List<Frame>(amount);
@ -85,8 +85,8 @@ class Animation {
List<double> stepTimes, {
double textureX = 0.0,
double textureY = 0.0,
double textureWidth = null,
double textureHeight = null,
double textureWidth,
double textureHeight,
}) {
this.frames = new List<Frame>(amount);
for (var i = 0; i < amount; i++) {
@ -108,7 +108,7 @@ class Animation {
bool get isLastFrame => currentIndex == frames.length - 1;
/// Sets a different step time to each frame. The sizes of the arrays must match.
void set variableStepTimes(List<double> stepTimes) {
set variableStepTimes(List<double> stepTimes) {
assert(stepTimes.length == frames.length);
for (int i = 0; i < frames.length; i++) {
frames[i].stepTime = stepTimes[i];

View File

@ -1,7 +1,7 @@
import 'dart:ui';
import 'dart:math' as math;
import 'package:flutter/src/painting/text_painter.dart';
import 'package:flutter/widgets.dart';
import 'component.dart';
import 'resizable.dart';

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:flame/components/component.dart';
@ -77,7 +78,5 @@ class TiledComponent extends Component {
}
@override
void update(double t) {
// TODO: implement update
}
void update(double t) {}
}

View File

@ -57,7 +57,8 @@ class Util {
/// Use this in order to get it to work in case your app also contains other widgets.
void addGestureRecognizer(GestureRecognizer recognizer) {
if (GestureBinding.instance == null) {
throw new Exception("GestureBinding is not initialized yet, this probably happened because addGestureRecognizer was called before the runApp method");
throw new Exception(
"GestureBinding is not initialized yet, this probably happened because addGestureRecognizer was called before the runApp method");
}
GestureBinding.instance.pointerRouter.addGlobalRoute((PointerEvent e) {

View File

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';