prefer const constructors (#8316)

This commit is contained in:
Alexandre Ardhuin
2017-02-21 23:54:29 +01:00
committed by Adam Barth
parent 663862557b
commit e9a775bf38
43 changed files with 145 additions and 145 deletions

View File

@@ -27,7 +27,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> {
builder: (BuildContext context, List<Color> data, List<dynamic> rejectedData) {
return new Container(
height: 100.0,
margin: new EdgeInsets.all(10.0),
margin: const EdgeInsets.all(10.0),
decoration: new BoxDecoration(
border: new Border.all(
width: 3.0,

View File

@@ -169,7 +169,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
setState(() {
markers[MarkerType.touch] = globalPosition;
final RenderBox box = target.currentContext.findRenderObject();
markers[MarkerType.topLeft] = box.localToGlobal(new Point(0.0, 0.0));
markers[MarkerType.topLeft] = box.localToGlobal(const Point(0.0, 0.0));
final Size size = box.size;
markers[MarkerType.bottomRight] = box.localToGlobal(new Point(size.width, size.height));
final ScrollableState scrollable = Scrollable.of(target.currentContext);

View File

@@ -40,7 +40,7 @@ class PageViewAppState extends State<PageViewApp> {
const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: FontWeight.bold);
List<CardModel> cardModels;
Size pageSize = new Size(200.0, 200.0);
Size pageSize = const Size(200.0, 200.0);
Axis scrollDirection = Axis.horizontal;
bool itemsWrap = false;