Small Flutter strong mode cleanup fixes. (#7825)

* Small Flutter strong mode cleanup fixes.

These are cases where strong mode down cast composite errors
generally indicated cases that would performance or correctness
issues if Flutter code was run in a strong mode VM.

* Fix Command API so that it is always in terms of Map<String,String>.

* Fix typedef
This commit is contained in:
Jacob Richman
2017-02-06 08:55:09 -08:00
committed by Adam Barth
parent 82f887de07
commit 53fc96da9e
6 changed files with 19 additions and 18 deletions

View File

@@ -48,7 +48,7 @@ class Scroll extends CommandWithTarget {
) : super(finder);
/// Deserializes this command from JSON generated by [serialize].
Scroll.deserialize(Map<String, dynamic> json)
Scroll.deserialize(Map<String, String> json)
: this.dx = double.parse(json['dx']),
this.dy = double.parse(json['dy']),
this.duration = new Duration(microseconds: int.parse(json['duration'])),
@@ -98,7 +98,7 @@ class ScrollIntoView extends CommandWithTarget {
ScrollIntoView(SerializableFinder finder) : super(finder);
/// Deserializes this command from JSON generated by [serialize].
ScrollIntoView.deserialize(Map<String, dynamic> json)
ScrollIntoView.deserialize(Map<String, String> json)
: super.deserialize(json);
// This is here just to be clear that this command isn't adding any extra

View File

@@ -20,7 +20,7 @@ class SetInputText extends CommandWithTarget {
final String text;
/// Deserializes this command from JSON generated by [serialize].
SetInputText.deserialize(Map<String, dynamic> json)
SetInputText.deserialize(Map<String, String> json)
: this.text = json['text'],
super.deserialize(json);
@@ -55,7 +55,7 @@ class SubmitInputText extends CommandWithTarget {
SubmitInputText(SerializableFinder finder) : super(finder);
/// Deserializes this command from JSON generated by [serialize].
SubmitInputText.deserialize(Map<String, dynamic> json)
SubmitInputText.deserialize(Map<String, String> json)
: super.deserialize(json);
}