fix some apis

This commit is contained in:
Luan Nico
2018-04-15 10:00:18 -03:00
parent 6871b2993a
commit 879b358ad3
7 changed files with 42 additions and 30 deletions

View File

@ -45,7 +45,7 @@ class GameRenderBox extends RenderBox {
int _frameCallbackId;
Duration previous = Duration.ZERO;
Duration previous = Duration.zero;
GameRenderBox(this.context, this.game);
@ -91,11 +91,11 @@ class GameRenderBox extends RenderBox {
double _computeDeltaT(Duration now) {
Duration delta = now - previous;
if (previous == Duration.ZERO) {
delta = Duration.ZERO;
if (previous == Duration.zero) {
delta = Duration.zero;
}
previous = now;
return delta.inMicroseconds / Duration.MICROSECONDS_PER_SECOND;
return delta.inMicroseconds / Duration.microsecondsPerSecond;
}
@override