From b25488ceadd5546bcf96757dc9f60148cd9fca1b Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 30 Sep 2015 22:25:54 -0700 Subject: [PATCH] Keep the two ConstrainedBox classes together @abarth --- packages/flutter/lib/src/fn3/basic.dart | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/flutter/lib/src/fn3/basic.dart b/packages/flutter/lib/src/fn3/basic.dart index a1d2d34a6a..13bd235842 100644 --- a/packages/flutter/lib/src/fn3/basic.dart +++ b/packages/flutter/lib/src/fn3/basic.dart @@ -229,6 +229,21 @@ class SizedBox extends OneChildRenderObjectWidget { } } +class ConstrainedBox extends OneChildRenderObjectWidget { + ConstrainedBox({ Key key, this.constraints, Widget child }) + : super(key: key, child: child) { + assert(constraints != null); + } + + final BoxConstraints constraints; + + RenderConstrainedBox createRenderObject() => new RenderConstrainedBox(additionalConstraints: constraints); + + void updateRenderObject(RenderConstrainedBox renderObject, ConstrainedBox oldWidget) { + renderObject.additionalConstraints = constraints; + } +} + class OverflowBox extends OneChildRenderObjectWidget { OverflowBox({ Key key, this.minWidth, this.maxWidth, this.minHeight, this.maxHeight, Widget child }) : super(key: key, child: child); @@ -253,21 +268,6 @@ class OverflowBox extends OneChildRenderObjectWidget { } } -class ConstrainedBox extends OneChildRenderObjectWidget { - ConstrainedBox({ Key key, this.constraints, Widget child }) - : super(key: key, child: child) { - assert(constraints != null); - } - - final BoxConstraints constraints; - - RenderConstrainedBox createRenderObject() => new RenderConstrainedBox(additionalConstraints: constraints); - - void updateRenderObject(RenderConstrainedBox renderObject, ConstrainedBox oldWidget) { - renderObject.additionalConstraints = constraints; - } -} - class AspectRatio extends OneChildRenderObjectWidget { AspectRatio({ Key key, this.aspectRatio, Widget child }) : super(key: key, child: child) {