Revert "Merge pull request #2639 from Hixie/always_specify_types"
This reverts commitf41b3411da, reversing changes made toe33d8d9621. This was a bad check-in due to my mangling uploading a new version of the branch from a different machine. This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
This commit is contained in:
@@ -424,7 +424,7 @@ class ActionTween extends ActionInterval {
|
||||
}
|
||||
|
||||
void update(double t) {
|
||||
dynamic newVal;
|
||||
var newVal;
|
||||
|
||||
if (startVal is Point) {
|
||||
// Point
|
||||
|
||||
@@ -35,8 +35,8 @@ class PhysicsBody {
|
||||
bool bullet: false,
|
||||
bool active: true,
|
||||
this.gravityScale: 1.0,
|
||||
String collisionCategory: "Default",
|
||||
List<Object> collisionMask
|
||||
collisionCategory: "Default",
|
||||
collisionMask: null
|
||||
}) {
|
||||
this.density = density;
|
||||
this.friction = friction;
|
||||
|
||||
@@ -314,7 +314,7 @@ class PhysicsContact {
|
||||
final PhysicsShape shapeB;
|
||||
|
||||
/// True if the two nodes are touching.
|
||||
final bool isTouching;
|
||||
final isTouching;
|
||||
|
||||
/// To ignore the collision to take place, you can set isEnabled to false
|
||||
/// during the preSolve phase.
|
||||
|
||||
@@ -164,7 +164,7 @@ class SpriteBox extends RenderBox {
|
||||
// Event handling
|
||||
|
||||
void _addEventTargets(Node node, List<Node> eventTargets) {
|
||||
List<Node> children = node.children;
|
||||
List children = node.children;
|
||||
int i = 0;
|
||||
|
||||
// Add childrens that are behind this node
|
||||
|
||||
@@ -19,12 +19,12 @@ class SpriteSheet {
|
||||
assert(jsonDefinition != null);
|
||||
|
||||
JsonDecoder decoder = new JsonDecoder();
|
||||
Map<dynamic, dynamic> file = decoder.convert(jsonDefinition);
|
||||
Map file = decoder.convert(jsonDefinition);
|
||||
assert(file != null);
|
||||
|
||||
List<dynamic> frames = file["frames"];
|
||||
List frames = file["frames"];
|
||||
|
||||
for (Map<dynamic, dynamic> frameInfo in frames) {
|
||||
for (Map frameInfo in frames) {
|
||||
String fileName = frameInfo["filename"];
|
||||
Rect frame = _readJsonRect(frameInfo["frame"]);
|
||||
bool rotated = frameInfo["rotated"];
|
||||
@@ -33,13 +33,13 @@ class SpriteSheet {
|
||||
Size sourceSize = _readJsonSize(frameInfo["sourceSize"]);
|
||||
Point pivot = _readJsonPoint(frameInfo["pivot"]);
|
||||
|
||||
Texture texture = new Texture._fromSpriteFrame(_image, fileName, sourceSize, rotated, trimmed, frame,
|
||||
var texture = new Texture._fromSpriteFrame(_image, fileName, sourceSize, rotated, trimmed, frame,
|
||||
spriteSourceSize, pivot);
|
||||
_textures[fileName] = texture;
|
||||
}
|
||||
}
|
||||
|
||||
Rect _readJsonRect(Map<dynamic, dynamic> data) {
|
||||
Rect _readJsonRect(Map data) {
|
||||
num x = data["x"];
|
||||
num y = data["y"];
|
||||
num w = data["w"];
|
||||
@@ -48,14 +48,14 @@ class SpriteSheet {
|
||||
return new Rect.fromLTRB(x.toDouble(), y.toDouble(), (x + w).toDouble(), (y + h).toDouble());
|
||||
}
|
||||
|
||||
Size _readJsonSize(Map<dynamic, dynamic> data) {
|
||||
Size _readJsonSize(Map data) {
|
||||
num w = data["w"];
|
||||
num h = data["h"];
|
||||
|
||||
return new Size(w.toDouble(), h.toDouble());
|
||||
}
|
||||
|
||||
Point _readJsonPoint(Map<dynamic, dynamic> data) {
|
||||
Point _readJsonPoint(Map data) {
|
||||
num x = data["x"];
|
||||
num y = data["y"];
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class VirtualJoystick extends NodeWithSize {
|
||||
else if (event.type == PointerUpEvent || event.type == PointerCancelEvent) {
|
||||
_pointerDownAt = null;
|
||||
_value = Point.origin;
|
||||
ActionTween moveToCenter = new ActionTween((Point a) => _handlePos = a, _handlePos, _center, 0.4, Curves.elasticOut);
|
||||
ActionTween moveToCenter = new ActionTween((a) => _handlePos = a, _handlePos, _center, 0.4, Curves.elasticOut);
|
||||
actions.run(moveToCenter);
|
||||
_isDown = false;
|
||||
} else if (event.type == PointerMoveEvent) {
|
||||
|
||||
Reference in New Issue
Block a user