| Index: sky/examples/raw/render_paragraph.dart
|
| diff --git a/sky/examples/raw/render_paragraph.dart b/sky/examples/raw/render_paragraph.dart
|
| index 24cb1d596c27978c81b94f0efb05e0702a612768..1263115c3e81f36b311cce06b6cb9dfd1f5d8fa5 100644
|
| --- a/sky/examples/raw/render_paragraph.dart
|
| +++ b/sky/examples/raw/render_paragraph.dart
|
| @@ -8,30 +8,7 @@ import 'package:sky/framework/rendering/box.dart';
|
| import 'package:sky/framework/rendering/node.dart';
|
| import 'package:sky/framework/rendering/flex.dart';
|
| import 'package:sky/framework/rendering/paragraph.dart';
|
| -
|
| -class RenderSolidColor extends RenderDecoratedBox {
|
| - final Size desiredSize;
|
| - final int backgroundColor;
|
| -
|
| - RenderSolidColor(int backgroundColor, { this.desiredSize: const Size.infinite() })
|
| - : backgroundColor = backgroundColor,
|
| - super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
|
| -
|
| - Size getIntrinsicDimensions(BoxConstraints constraints) {
|
| - return constraints.constrain(desiredSize);
|
| - }
|
| -
|
| - void performLayout() {
|
| - size = constraints.constrain(desiredSize);
|
| - }
|
| -
|
| - void handlePointer(PointerEvent event) {
|
| - if (event.type == 'pointerdown')
|
| - decoration = new BoxDecoration(backgroundColor: 0xFFFF0000);
|
| - else if (event.type == 'pointerup')
|
| - decoration = new BoxDecoration(backgroundColor: backgroundColor);
|
| - }
|
| -}
|
| +import '../lib/solid_color_box.dart';
|
|
|
| AppView app;
|
|
|
| @@ -43,7 +20,7 @@ void main() {
|
| child: flexRoot
|
| );
|
|
|
| - RenderNode child = new RenderSolidColor(0xFFFFFF00);
|
| + RenderNode child = new RenderSolidColorBox(0xFFFFFF00);
|
| flexRoot.add(child);
|
| child.parentData.flex = 2;
|
|
|
|
|