Commit 1aeea626 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Fix some misuse of types (#5197)

Thanks to @leafpetersen for catching these.
parent c8db0041
...@@ -24,7 +24,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> { ...@@ -24,7 +24,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new DragTarget<Color>( return new DragTarget<Color>(
onAccept: _handleAccept, onAccept: _handleAccept,
builder: (BuildContext context, List<Color> data, List<Color> rejectedData) { builder: (BuildContext context, List<Color> data, List<dynamic> rejectedData) {
return new Container( return new Container(
height: 100.0, height: 100.0,
margin: new EdgeInsets.all(10.0), margin: new EdgeInsets.all(10.0),
...@@ -214,7 +214,7 @@ class MovableBall extends StatelessWidget { ...@@ -214,7 +214,7 @@ class MovableBall extends StatelessWidget {
} else { } else {
return new DragTarget<bool>( return new DragTarget<bool>(
onAccept: (bool data) { callback(position); }, onAccept: (bool data) { callback(position); },
builder: (BuildContext context, List<bool> accepted, List<bool> rejected) { builder: (BuildContext context, List<bool> accepted, List<dynamic> rejected) {
return dashedBall; return dashedBall;
} }
); );
......
...@@ -178,7 +178,7 @@ abstract class AnimatedWidgetBaseState<T extends ImplicitlyAnimatedWidget> exten ...@@ -178,7 +178,7 @@ abstract class AnimatedWidgetBaseState<T extends ImplicitlyAnimatedWidget> exten
bool _constructTweens() { bool _constructTweens() {
bool shouldStartAnimation = false; bool shouldStartAnimation = false;
forEachTween((Tween<dynamic> tween, dynamic targetValue, TweenConstructor<T> constructor) { forEachTween((Tween<dynamic> tween, dynamic targetValue, TweenConstructor<dynamic> constructor) {
if (targetValue != null) { if (targetValue != null) {
tween ??= constructor(targetValue); tween ??= constructor(targetValue);
if (_shouldAnimateTween(tween, targetValue)) if (_shouldAnimateTween(tween, targetValue))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment