From 55a1a573fd9dae637816b67556f54bfe6ab41de9 Mon Sep 17 00:00:00 2001 From: Seth Ladd Date: Thu, 22 Feb 2018 21:37:01 -0800 Subject: [PATCH] small readme code tweak Dart 2 infers the type of the collection, and the type of variables, so here's a proposal to simplify the README just a bit. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 53f8e8c..1f4da9a 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,12 @@ class MyWidget extends StatefulWidget { } class MyWidgetState extends State { - final ScrollController _controller = new ScrollController(); + final _controller = new ScrollController(); @override Widget build(BuildContext context) { return new ListView( controller: _controller, - children: [ + children: [ new ParallaxImage( image: new AssetImage('images/january.jpg'), // Extent of this widget in scroll direction.