prefer const constructors (#8316)
This commit is contained in:
committed by
Adam Barth
parent
663862557b
commit
e9a775bf38
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user