diff --git a/sdk/lib/framework/app.dart b/sdk/lib/framework/app.dart index 8f4e7ccb15b..2c84da438bf 100644 --- a/sdk/lib/framework/app.dart +++ b/sdk/lib/framework/app.dart @@ -9,7 +9,7 @@ import 'scheduler.dart' as scheduler; class PointerState { HitTestResult result; - sky.Point lastPosition; + Point lastPosition; PointerState({ this.result, this.lastPosition }); } @@ -51,12 +51,12 @@ class AppView { _handlePointerEvent(event); } else if (event is sky.GestureEvent) { HitTestResult result = new HitTestResult(); - _renderView.hitTest(result, position: new sky.Point(event.x, event.y)); + _renderView.hitTest(result, position: new Point(event.x, event.y)); dispatchEvent(event, result); } } - PointerState _createStateForPointer(sky.PointerEvent event, sky.Point position) { + PointerState _createStateForPointer(sky.PointerEvent event, Point position) { HitTestResult result = new HitTestResult(); _renderView.hitTest(result, position: position); PointerState state = new PointerState(result: result, lastPosition: position); @@ -65,7 +65,7 @@ class AppView { } void _handlePointerEvent(sky.PointerEvent event) { - sky.Point position = new sky.Point(event.x, event.y); + Point position = new Point(event.x, event.y); PointerState state; switch(event.type) { diff --git a/sdk/lib/framework/components2/drawer.dart b/sdk/lib/framework/components2/drawer.dart index c23ec7d0910..6918e6107c0 100644 --- a/sdk/lib/framework/components2/drawer.dart +++ b/sdk/lib/framework/components2/drawer.dart @@ -5,7 +5,6 @@ import '../animation/animated_value.dart'; import '../animation/curves.dart'; import '../fn2.dart'; -import '../rendering/box.dart'; import '../theme/colors.dart'; import 'animated_component.dart'; import 'dart:math' as math; @@ -111,11 +110,11 @@ class Drawer extends AnimatedComponent { Matrix4 transform = new Matrix4.identity(); transform.translate(_position); - sky.Color maskColor = new sky.Color(((_position / _kWidth + 1) * 0xFF).floor() << 24); + Color maskColor = new Color(((_position / _kWidth + 1) * 0xFF).floor() << 24); var mask = new EventListenerNode( new Container( - desiredSize: sky.Size.infinite, + desiredSize: Size.infinite, decoration: new BoxDecoration(backgroundColor: maskColor) ), onGestureTap: controller.handleMaskTap, @@ -124,8 +123,8 @@ class Drawer extends AnimatedComponent { Material content = new Material( content: new Container( - decoration: new BoxDecoration(backgroundColor: new sky.Color(0xFFFFFFFF)), - desiredSize: new sky.Size.fromWidth(_kWidth), + decoration: new BoxDecoration(backgroundColor: new Color(0xFFFFFFFF)), + desiredSize: new Size.fromWidth(_kWidth), transform: transform, child: new BlockContainer(children: children) ), diff --git a/sdk/lib/framework/components2/fixed_height_scrollable.dart b/sdk/lib/framework/components2/fixed_height_scrollable.dart index fc1fc72712e..b70932e9188 100644 --- a/sdk/lib/framework/components2/fixed_height_scrollable.dart +++ b/sdk/lib/framework/components2/fixed_height_scrollable.dart @@ -6,7 +6,6 @@ import '../animation/scroll_behavior.dart'; import '../fn2.dart'; import 'dart:async'; import 'dart:math' as math; -import 'dart:sky' as sky; import 'package:vector_math/vector_math.dart'; import 'scrollable.dart'; @@ -30,7 +29,7 @@ abstract class FixedHeightScrollable extends Scrollable { } } - void _handleSizeChanged(sky.Size newSize) { + void _handleSizeChanged(Size newSize) { setState(() { _height = newSize.height; scrollBehavior.containerHeight = _height; diff --git a/sdk/lib/framework/components2/icon.dart b/sdk/lib/framework/components2/icon.dart index 2d31def8359..fbc12dc0454 100644 --- a/sdk/lib/framework/components2/icon.dart +++ b/sdk/lib/framework/components2/icon.dart @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import '../fn2.dart'; -import '../rendering/box.dart'; // TODO(eseidel): This should use package:. const String kAssetBase = '/packages/sky/assets/material-design-icons'; @@ -28,7 +26,7 @@ class Icon extends Component { subtype = parts[1]; } return new Image( - size: new sky.Size(size.toDouble(), size.toDouble()), + size: new Size(size.toDouble(), size.toDouble()), src: '${kAssetBase}/${category}/2x_web/ic_${subtype}_${size}dp.png' ); } diff --git a/sdk/lib/framework/components2/menu_divider.dart b/sdk/lib/framework/components2/menu_divider.dart index c487325ab8b..8c322f07ddd 100644 --- a/sdk/lib/framework/components2/menu_divider.dart +++ b/sdk/lib/framework/components2/menu_divider.dart @@ -2,9 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import '../fn2.dart'; -import '../rendering/box.dart'; class MenuDivider extends Component { MenuDivider({ Object key }) : super(key: key); @@ -14,7 +12,7 @@ class MenuDivider extends Component { decoration: const BoxDecoration( border: const Border( bottom: const BorderSide( - color: const sky.Color.fromARGB(31, 0, 0, 0) + color: const Color.fromARGB(31, 0, 0, 0) ) ) ), diff --git a/sdk/lib/framework/components2/menu_item.dart b/sdk/lib/framework/components2/menu_item.dart index ba14b296c6b..79db993cb59 100644 --- a/sdk/lib/framework/components2/menu_item.dart +++ b/sdk/lib/framework/components2/menu_item.dart @@ -2,10 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import '../fn2.dart'; -import '../rendering/box.dart'; -import '../rendering/flex.dart'; import 'button_base.dart'; import 'icon.dart'; import 'ink_well.dart'; @@ -13,7 +10,7 @@ import 'ink_well.dart'; class MenuItem extends ButtonBase { static const BoxDecoration highlightDecoration = const BoxDecoration( - backgroundColor: const sky.Color.fromARGB(102, 153, 153, 153) + backgroundColor: const Color.fromARGB(102, 153, 153, 153) ); List children; @@ -43,7 +40,7 @@ class MenuItem extends ButtonBase { ) ] ), - desiredSize: const sky.Size.fromHeight(48.0), + desiredSize: const Size.fromHeight(48.0), decoration: highlight ? highlightDecoration : null ), onGestureTap: onGestureTap diff --git a/sdk/lib/framework/components2/radio.dart b/sdk/lib/framework/components2/radio.dart index 250096538f8..9890ce31fa4 100644 --- a/sdk/lib/framework/components2/radio.dart +++ b/sdk/lib/framework/components2/radio.dart @@ -4,12 +4,11 @@ import 'package:sky/framework/theme2/colors.dart' as colors; -import 'dart:sky' as sky; import '../fn2.dart'; -import '../rendering/box.dart'; import '../rendering/object.dart'; import 'button_base.dart'; import 'ink_well.dart'; +import 'dart:sky' as sky; typedef void ValueChanged(value); @@ -27,18 +26,18 @@ class Radio extends ButtonBase { UINode buildContent() { // TODO(jackson): This should change colors with the theme - sky.Color color = highlight ? colors.Purple[500] : const sky.Color(0x8A000000); + Color color = highlight ? colors.Purple[500] : const Color(0x8A000000); const double diameter = 16.0; const double outerRadius = diameter / 2; const double innerRadius = 5.0; return new EventListenerNode( new Container( margin: const EdgeDims.symmetric(horizontal: 5.0), - desiredSize: new sky.Size(diameter, diameter), + desiredSize: new Size(diameter, diameter), child: new CustomPaint( callback: (sky.Canvas canvas) { - sky.Paint paint = new sky.Paint()..color = color; + Paint paint = new Paint()..color = color; // Draw the outer circle paint.setStyle(sky.PaintingStyle.stroke); diff --git a/sdk/lib/framework/components2/scaffold.dart b/sdk/lib/framework/components2/scaffold.dart index 9b3dbefb304..51fce8024d7 100644 --- a/sdk/lib/framework/components2/scaffold.dart +++ b/sdk/lib/framework/components2/scaffold.dart @@ -3,11 +3,9 @@ // found in the LICENSE file. import '../fn2.dart'; -import 'dart:sky' as sky; import '../rendering/box.dart'; import '../rendering/object.dart'; - enum ScaffoldSlots { toolbar, body, @@ -75,7 +73,7 @@ class RenderScaffold extends RenderBox { bool get sizedByParent => true; void performResize() { - size = constraints.constrain(sky.Size.infinite); + size = constraints.constrain(Size.infinite); assert(size.width < double.INFINITY); assert(size.height < double.INFINITY); } @@ -90,34 +88,34 @@ class RenderScaffold extends RenderBox { double bodyPosition = 0.0; if (_slots[ScaffoldSlots.toolbar] != null) { RenderBox toolbar = _slots[ScaffoldSlots.toolbar]; - toolbar.layout(new BoxConstraints.tight(new sky.Size(size.width, kToolbarHeight))); + toolbar.layout(new BoxConstraints.tight(new Size(size.width, kToolbarHeight))); assert(toolbar.parentData is BoxParentData); - toolbar.parentData.position = new sky.Point(0.0, 0.0); + toolbar.parentData.position = new Point(0.0, 0.0); bodyPosition = kToolbarHeight; bodyHeight -= kToolbarHeight; } if (_slots[ScaffoldSlots.statusBar] != null) { RenderBox statusbar = _slots[ScaffoldSlots.statusBar]; - statusbar.layout(new BoxConstraints.tight(new sky.Size(size.width, kStatusbarHeight))); + statusbar.layout(new BoxConstraints.tight(new Size(size.width, kStatusbarHeight))); assert(statusbar.parentData is BoxParentData); - statusbar.parentData.position = new sky.Point(0.0, size.height - kStatusbarHeight); + statusbar.parentData.position = new Point(0.0, size.height - kStatusbarHeight); bodyHeight -= kStatusbarHeight; } if (_slots[ScaffoldSlots.body] != null) { RenderBox body = _slots[ScaffoldSlots.body]; - body.layout(new BoxConstraints.tight(new sky.Size(size.width, bodyHeight))); + body.layout(new BoxConstraints.tight(new Size(size.width, bodyHeight))); assert(body.parentData is BoxParentData); - body.parentData.position = new sky.Point(0.0, bodyPosition); + body.parentData.position = new Point(0.0, bodyPosition); } if (_slots[ScaffoldSlots.drawer] != null) { RenderBox drawer = _slots[ScaffoldSlots.drawer]; drawer.layout(new BoxConstraints(minWidth: 0.0, maxWidth: size.width, minHeight: size.height, maxHeight: size.height)); assert(drawer.parentData is BoxParentData); - drawer.parentData.position = new sky.Point(0.0, 0.0); + drawer.parentData.position = new Point(0.0, 0.0); } if (_slots[ScaffoldSlots.floatingActionButton] != null) { RenderBox floatingActionButton = _slots[ScaffoldSlots.floatingActionButton]; - sky.Size area = new sky.Size(size.width + kButtonX, size.height + kButtonY); + Size area = new Size(size.width + kButtonX, size.height + kButtonY); floatingActionButton.layout(new BoxConstraints.loose(area)); assert(floatingActionButton.parentData is BoxParentData); floatingActionButton.parentData.position = (area - floatingActionButton.size).toPoint(); @@ -134,12 +132,12 @@ class RenderScaffold extends RenderBox { } } - void hitTestChildren(HitTestResult result, { sky.Point position }) { + void hitTestChildren(HitTestResult result, { Point position }) { for (ScaffoldSlots slot in [ScaffoldSlots.drawer, ScaffoldSlots.floatingActionButton, ScaffoldSlots.toolbar, ScaffoldSlots.statusBar, ScaffoldSlots.body]) { RenderBox box = _slots[slot]; if (box != null) { assert(box.parentData is BoxParentData); - if (new sky.Rect.fromPointAndSize(box.parentData.position, box.size).contains(position)) { + if (new Rect.fromPointAndSize(box.parentData.position, box.size).contains(position)) { if (box.hitTest(result, position: (position - box.parentData.position).toPoint())) return; } diff --git a/sdk/lib/framework/components2/tool_bar.dart b/sdk/lib/framework/components2/tool_bar.dart index 3ba80eb6ae3..dc390c4b59d 100644 --- a/sdk/lib/framework/components2/tool_bar.dart +++ b/sdk/lib/framework/components2/tool_bar.dart @@ -2,18 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import '../fn2.dart'; import '../theme/view_configuration.dart'; -import '../rendering/box.dart'; -import '../rendering/flex.dart'; // import 'material.dart'; class ToolBar extends Component { UINode left; UINode center; List right; - sky.Color backgroundColor; + Color backgroundColor; ToolBar({ String key, @@ -41,7 +38,7 @@ class ToolBar extends Component { children: children, direction: FlexDirection.horizontal ), - desiredSize: new sky.Size.fromHeight(56.0), + desiredSize: new Size.fromHeight(56.0), padding: new EdgeDims(kStatusBarHeight.toDouble(), 8.0, 0.0, 8.0), decoration: new BoxDecoration(backgroundColor: backgroundColor) ); diff --git a/sdk/lib/framework/fn2.dart b/sdk/lib/framework/fn2.dart index af76afc46d8..7178d8bffe6 100644 --- a/sdk/lib/framework/fn2.dart +++ b/sdk/lib/framework/fn2.dart @@ -17,6 +17,9 @@ import 'rendering/flex.dart'; import 'rendering/object.dart'; import 'rendering/paragraph.dart'; import 'rendering/stack.dart'; +export 'rendering/object.dart' show Point, Size, Rect, Color, Paint, Path; +export 'rendering/box.dart' show BoxDecoration, Border, BorderSide, EdgeDims; +export 'rendering/flex.dart' show FlexDirection; // final sky.Tracing _tracing = sky.window.tracing; @@ -399,7 +402,7 @@ class DecoratedBox extends OneChildRenderObjectWrapper { class SizedBox extends OneChildRenderObjectWrapper { RenderSizedBox root; - final sky.Size desiredSize; + final Size desiredSize; SizedBox({ this.desiredSize, UINode child, Object key }) : super(child: child, key: key); @@ -718,7 +721,7 @@ class Image extends RenderObjectWrapper { RenderImage createNode() => new RenderImage(this.src, this.size); final String src; - final sky.Size size; + final Size size; Image({ Object key, @@ -958,7 +961,7 @@ class Container extends Component { final Matrix4 transform; final EdgeDims margin; final BoxDecoration decoration; - final sky.Size desiredSize; + final Size desiredSize; final EdgeDims padding; Container({ diff --git a/sdk/lib/framework/rendering/block.dart b/sdk/lib/framework/rendering/block.dart index a105f582b41..b56856073ff 100644 --- a/sdk/lib/framework/rendering/block.dart +++ b/sdk/lib/framework/rendering/block.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import 'box.dart'; import 'object.dart'; @@ -31,7 +30,7 @@ class RenderBlock extends RenderBox with ContainerRenderObjectMixin maxWidth >= double.INFINITY || maxHeight >= double.INFINITY; @@ -108,7 +108,7 @@ class BoxConstraints { } class BoxParentData extends ParentData { - sky.Point position = new sky.Point(0.0, 0.0); + Point position = new Point(0.0, 0.0); String toString() => 'position=$position'; } @@ -124,14 +124,14 @@ abstract class RenderBox extends RenderObject { // if it must, but it should be as cheap as possible; just get the // dimensions and nothing else (e.g. don't calculate hypothetical // child positions if they're not needed to determine dimensions) - sky.Size getIntrinsicDimensions(BoxConstraints constraints) { - return constraints.constrain(new sky.Size(0.0, 0.0)); + Size getIntrinsicDimensions(BoxConstraints constraints) { + return constraints.constrain(new Size(0.0, 0.0)); } BoxConstraints get constraints => super.constraints as BoxConstraints; void performResize() { // default behaviour for subclasses that have sizedByParent = true - size = constraints.constrain(new sky.Size(0.0, 0.0)); + size = constraints.constrain(new Size(0.0, 0.0)); assert(size.height < double.INFINITY); assert(size.width < double.INFINITY); } @@ -142,14 +142,14 @@ abstract class RenderBox extends RenderObject { assert(sizedByParent); } - bool hitTest(HitTestResult result, { sky.Point position }) { + bool hitTest(HitTestResult result, { Point position }) { hitTestChildren(result, position: position); result.add(this); return true; } - void hitTestChildren(HitTestResult result, { sky.Point position }) { } + void hitTestChildren(HitTestResult result, { Point position }) { } - sky.Size size = new sky.Size(0.0, 0.0); + Size size = new Size(0.0, 0.0); String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings(prefix)}${prefix}size: ${size}\n'; } @@ -159,7 +159,7 @@ abstract class RenderProxyBox extends RenderBox with RenderObjectWithChildMixin< this.child = child; } - sky.Size getIntrinsicDimensions(BoxConstraints constraints) { + Size getIntrinsicDimensions(BoxConstraints constraints) { if (child != null) return child.getIntrinsicDimensions(constraints); return super.getIntrinsicDimensions(constraints); @@ -174,7 +174,7 @@ abstract class RenderProxyBox extends RenderBox with RenderObjectWithChildMixin< } } - void hitTestChildren(HitTestResult result, { sky.Point position }) { + void hitTestChildren(HitTestResult result, { Point position }) { if (child != null) child.hitTest(result, position: position); else @@ -191,15 +191,15 @@ class RenderSizedBox extends RenderProxyBox { RenderSizedBox({ RenderBox child, - sky.Size desiredSize: sky.Size.infinite + Size desiredSize: Size.infinite }) : super(child) { assert(desiredSize != null); this.desiredSize = desiredSize; } - sky.Size _desiredSize; - sky.Size get desiredSize => _desiredSize; - void set desiredSize (sky.Size value) { + Size _desiredSize; + Size get desiredSize => _desiredSize; + void set desiredSize (Size value) { assert(value != null); if (_desiredSize == value) return; @@ -207,7 +207,7 @@ class RenderSizedBox extends RenderProxyBox { markNeedsLayout(); } - sky.Size getIntrinsicDimensions(BoxConstraints constraints) { + Size getIntrinsicDimensions(BoxConstraints constraints) { return constraints.constrain(_desiredSize); } @@ -226,7 +226,7 @@ class RenderClip extends RenderProxyBox { void paint(RenderObjectDisplayList canvas) { if (child != null) { canvas.save(); - canvas.clipRect(new sky.Rect.fromSize(size)); + canvas.clipRect(new Rect.fromSize(size)); child.paint(canvas); canvas.restore(); } @@ -251,7 +251,7 @@ class RenderPadding extends RenderBox with RenderObjectWithChildMixin markNeedsLayout(); } - sky.Size getIntrinsicDimensions(BoxConstraints constraints) { + Size getIntrinsicDimensions(BoxConstraints constraints) { assert(padding != null); constraints = constraints.deflate(padding); if (child == null) @@ -264,13 +264,13 @@ class RenderPadding extends RenderBox with RenderObjectWithChildMixin BoxConstraints innerConstraints = constraints.deflate(padding); if (child == null) { size = innerConstraints.constrain( - new sky.Size(padding.left + padding.right, padding.top + padding.bottom)); + new Size(padding.left + padding.right, padding.top + padding.bottom)); return; } child.layout(innerConstraints, parentUsesSize: true); assert(child.parentData is BoxParentData); - child.parentData.position = new sky.Point(padding.left, padding.top); - size = constraints.constrain(new sky.Size(padding.left + child.size.width + padding.right, + child.parentData.position = new Point(padding.left, padding.top); + size = constraints.constrain(new Size(padding.left + child.size.width + padding.right, padding.top + child.size.height + padding.bottom)); } @@ -279,12 +279,12 @@ class RenderPadding extends RenderBox with RenderObjectWithChildMixin canvas.paintChild(child, child.parentData.position); } - void hitTestChildren(HitTestResult result, { sky.Point position }) { + void hitTestChildren(HitTestResult result, { Point position }) { if (child != null) { assert(child.parentData is BoxParentData); - sky.Rect childBounds = new sky.Rect.fromPointAndSize(child.parentData.position, child.size); + Rect childBounds = new Rect.fromPointAndSize(child.parentData.position, child.size); if (childBounds.contains(position)) { - child.hitTest(result, position: new sky.Point(position.x - child.parentData.position.x, + child.hitTest(result, position: new Point(position.x - child.parentData.position.x, position.y - child.parentData.position.y)); } } @@ -295,7 +295,7 @@ class RenderPadding extends RenderBox with RenderObjectWithChildMixin class RenderImage extends RenderBox { - RenderImage(String url, sky.Size dimensions) { + RenderImage(String url, Size dimensions) { requestedSize = dimensions; src = url; } @@ -315,9 +315,9 @@ class RenderImage extends RenderBox { }); } - sky.Size _requestedSize; - sky.Size get requestedSize => _requestedSize; - void set requestedSize (sky.Size value) { + Size _requestedSize; + Size get requestedSize => _requestedSize; + void set requestedSize (Size value) { if (value == _requestedSize) return; _requestedSize = value; @@ -329,7 +329,7 @@ class RenderImage extends RenderBox { if (_image == null) { double width = requestedSize.width == null ? 0.0 : requestedSize.width; double height = requestedSize.height == null ? 0.0 : requestedSize.height; - size = constraints.constrain(new sky.Size(width, height)); + size = constraints.constrain(new Size(width, height)); return; } @@ -338,14 +338,14 @@ class RenderImage extends RenderBox { // maintain the aspect ratio if (requestedSize.width == null) { if (requestedSize.height == null) { - size = constraints.constrain(new sky.Size(_image.width.toDouble(), _image.height.toDouble())); + size = constraints.constrain(new Size(_image.width.toDouble(), _image.height.toDouble())); } else { double width = requestedSize.height * _image.width / _image.height; - size = constraints.constrain(new sky.Size(width, requestedSize.height)); + size = constraints.constrain(new Size(width, requestedSize.height)); } } else if (requestedSize.height == null) { double height = requestedSize.width * _image.height / _image.width; - size = constraints.constrain(new sky.Size(requestedSize.width, height)); + size = constraints.constrain(new Size(requestedSize.width, height)); } else { size = constraints.constrain(requestedSize); } @@ -360,7 +360,7 @@ class RenderImage extends RenderBox { canvas.save(); canvas.scale(widthScale, heightScale); } - sky.Paint paint = new sky.Paint(); + Paint paint = new Paint(); canvas.drawImage(_image, 0.0, 0.0, paint); if (needsScale) canvas.restore(); @@ -371,10 +371,10 @@ class RenderImage extends RenderBox { class BorderSide { const BorderSide({ - this.color: const sky.Color(0xFF000000), + this.color: const Color(0xFF000000), this.width: 1.0 }); - final sky.Color color; + final Color color; final double width; static const none = const BorderSide(width: 0.0); @@ -423,7 +423,7 @@ class BoxDecoration { this.border }); - final sky.Color backgroundColor; + final Color backgroundColor; final Border border; String toString([String prefix = '']) { @@ -462,8 +462,8 @@ class RenderDecoratedBox extends RenderProxyBox { assert(size.height != null); if (_decoration.backgroundColor != null) { - sky.Paint paint = new sky.Paint()..color = _decoration.backgroundColor; - canvas.drawRect(new sky.Rect.fromLTRB(0.0, 0.0, size.width, size.height), paint); + Paint paint = new Paint()..color = _decoration.backgroundColor; + canvas.drawRect(new Rect.fromLTRB(0.0, 0.0, size.width, size.height), paint); } if (_decoration.border != null) { @@ -472,11 +472,11 @@ class RenderDecoratedBox extends RenderProxyBox { assert(_decoration.border.bottom != null); assert(_decoration.border.left != null); - sky.Paint paint = new sky.Paint(); - sky.Path path; + Paint paint = new Paint(); + Path path; paint.color = _decoration.border.top.color; - path = new sky.Path(); + path = new Path(); path.moveTo(0.0,0.0); path.lineTo(_decoration.border.left.width, _decoration.border.top.width); path.lineTo(size.width - _decoration.border.right.width, _decoration.border.top.width); @@ -485,7 +485,7 @@ class RenderDecoratedBox extends RenderProxyBox { canvas.drawPath(path, paint); paint.color = _decoration.border.right.color; - path = new sky.Path(); + path = new Path(); path.moveTo(size.width, 0.0); path.lineTo(size.width - _decoration.border.right.width, _decoration.border.top.width); path.lineTo(size.width - _decoration.border.right.width, size.height - _decoration.border.bottom.width); @@ -494,7 +494,7 @@ class RenderDecoratedBox extends RenderProxyBox { canvas.drawPath(path, paint); paint.color = _decoration.border.bottom.color; - path = new sky.Path(); + path = new Path(); path.moveTo(size.width, size.height); path.lineTo(size.width - _decoration.border.right.width, size.height - _decoration.border.bottom.width); path.lineTo(_decoration.border.left.width, size.height - _decoration.border.bottom.width); @@ -503,7 +503,7 @@ class RenderDecoratedBox extends RenderProxyBox { canvas.drawPath(path, paint); paint.color = _decoration.border.left.color; - path = new sky.Path(); + path = new Path(); path.moveTo(0.0, size.height); path.lineTo(_decoration.border.left.width, size.height - _decoration.border.bottom.width); path.lineTo(_decoration.border.left.width, _decoration.border.top.width); @@ -562,14 +562,14 @@ class RenderTransform extends RenderProxyBox { markNeedsPaint(); } - void hitTestChildren(HitTestResult result, { sky.Point position }) { + void hitTestChildren(HitTestResult result, { Point position }) { Matrix4 inverse = new Matrix4.zero(); double det = inverse.copyInverse(_transform); // TODO(abarth): Check the determinant for degeneracy. Vector3 position3 = new Vector3(position.x, position.y, 0.0); Vector3 transformed3 = inverse.transform3(position3); - sky.Point transformed = new sky.Point(transformed3.x, transformed3.y); + Point transformed = new Point(transformed3.x, transformed3.y); super.hitTestChildren(result, position: transformed); } @@ -587,7 +587,7 @@ class RenderTransform extends RenderProxyBox { } } -typedef void SizeChangedCallback(sky.Size newSize); +typedef void SizeChangedCallback(Size newSize); class RenderSizeObserver extends RenderProxyBox { RenderSizeObserver({ @@ -600,7 +600,7 @@ class RenderSizeObserver extends RenderProxyBox { SizeChangedCallback callback; void performLayout() { - sky.Size oldSize = size; + Size oldSize = size; super.performLayout(); @@ -617,9 +617,9 @@ class BoxShadow { this.blur }); - final sky.Size offset; + final Size offset; final double blur; - final sky.Color color; + final Color color; } class RenderShadowedBox extends RenderProxyBox { @@ -638,9 +638,9 @@ class RenderShadowedBox extends RenderProxyBox { markNeedsPaint(); } - sky.Paint _createShadowPaint(BoxShadow shadow) { + Paint _createShadowPaint(BoxShadow shadow) { // TODO(eseidel): This should not be hard-coded yellow. - sky.Paint paint = new sky.Paint()..color = const sky.Color.fromARGB(255, 0, 255, 0); + Paint paint = new Paint()..color = const Color.fromARGB(255, 0, 255, 0); var builder = new sky.LayerDrawLooperBuilder() // Shadow layer. ..addLayerOnTop( @@ -648,7 +648,7 @@ class RenderShadowedBox extends RenderProxyBox { ..setPaintBits(-1) ..setOffset(shadow.offset.toPoint()) ..setColorMode(sky.TransferMode.srcMode), - (sky.Paint layerPaint) { + (Paint layerPaint) { layerPaint.color = shadow.color; layerPaint.setMaskFilter( new sky.MaskFilter.Blur(sky.BlurStyle.normal, shadow.blur, highQuality: true)); @@ -660,8 +660,8 @@ class RenderShadowedBox extends RenderProxyBox { } void paint(RenderObjectDisplayList canvas) { - sky.Paint paint = _createShadowPaint(_shadow); - canvas.drawRect(new sky.Rect.fromLTRB(0.0, 0.0, size.width, size.height), paint); + Paint paint = _createShadowPaint(_shadow); + canvas.drawRect(new Rect.fromLTRB(0.0, 0.0, size.width, size.height), paint); super.paint(canvas); } } @@ -716,7 +716,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin this.child = child; } - sky.Size _size = new sky.Size(0.0, 0.0); + Size _size = new Size(0.0, 0.0); double get width => _size.width; double get height => _size.height; @@ -732,7 +732,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin child.rotate(oldAngle: _orientation, newAngle: constraints.orientation, time: timeForRotation); _orientation = constraints.orientation; } - _size = new sky.Size(constraints.width, constraints.height); + _size = new Size(constraints.width, constraints.height); assert(_size.height < double.INFINITY); assert(_size.width < double.INFINITY); } @@ -748,9 +748,9 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin assert(false); // nobody tells the screen to rotate, the whole rotate() dance is started from our performResize() } - bool hitTest(HitTestResult result, { sky.Point position }) { + bool hitTest(HitTestResult result, { Point position }) { if (child != null) { - sky.Rect childBounds = new sky.Rect.fromSize(child.size); + Rect childBounds = new Rect.fromSize(child.size); if (childBounds.contains(position)) child.hitTest(result, position: position); } @@ -760,7 +760,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin void paint(RenderObjectDisplayList canvas) { if (child != null) - canvas.paintChild(child, new sky.Point(0.0, 0.0)); + canvas.paintChild(child, new Point(0.0, 0.0)); } void paintFrame() { @@ -776,14 +776,14 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin // DEFAULT BEHAVIORS FOR RENDERBOX CONTAINERS abstract class RenderBoxContainerDefaultsMixin> implements ContainerRenderObjectMixin { - void defaultHitTestChildren(HitTestResult result, { sky.Point position }) { + void defaultHitTestChildren(HitTestResult result, { Point position }) { // the x, y parameters have the top left of the node's box as the origin ChildType child = lastChild; while (child != null) { assert(child.parentData is ParentDataType); - sky.Rect childBounds = new sky.Rect.fromPointAndSize(child.parentData.position, child.size); + Rect childBounds = new Rect.fromPointAndSize(child.parentData.position, child.size); if (childBounds.contains(position)) { - if (child.hitTest(result, position: new sky.Point(position.x - child.parentData.position.x, + if (child.hitTest(result, position: new Point(position.x - child.parentData.position.x, position.y - child.parentData.position.y))) break; } diff --git a/sdk/lib/framework/rendering/flex.dart b/sdk/lib/framework/rendering/flex.dart index 189f5619d64..1a0a1f61d1a 100644 --- a/sdk/lib/framework/rendering/flex.dart +++ b/sdk/lib/framework/rendering/flex.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import 'box.dart'; import 'object.dart'; @@ -42,7 +41,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin true; void performResize() { - size = constraints.constrain(new sky.Size(constraints.maxWidth, constraints.maxHeight)); + size = constraints.constrain(new Size(constraints.maxWidth, constraints.maxHeight)); assert(size.height < double.INFINITY); assert(size.width < double.INFINITY); } @@ -99,11 +98,11 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin _color; - void set color (sky.Color value) { + Color _color = const Color(0xFF000000); + Color get color => _color; + void set color (Color value) { if (_color != value) { _color = value; markNeedsPaint(); } } - sky.Size getIntrinsicDimensions(BoxConstraints constraints) { + Size getIntrinsicDimensions(BoxConstraints constraints) { assert(false); return null; // we don't currently support this for RenderParagraph @@ -52,7 +52,7 @@ class RenderParagraph extends RenderBox { _layoutRoot.minHeight = constraints.minHeight; _layoutRoot.maxHeight = constraints.maxHeight; _layoutRoot.layout(); - size = constraints.constrain(new sky.Size(_layoutRoot.rootElement.width, _layoutRoot.rootElement.height)); + size = constraints.constrain(new Size(_layoutRoot.rootElement.width, _layoutRoot.rootElement.height)); } void paint(RenderObjectDisplayList canvas) { diff --git a/sdk/lib/framework/rendering/stack.dart b/sdk/lib/framework/rendering/stack.dart index 80f7bec7b83..b22cb69e522 100644 --- a/sdk/lib/framework/rendering/stack.dart +++ b/sdk/lib/framework/rendering/stack.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:sky' as sky; import 'box.dart'; import 'object.dart'; @@ -22,17 +21,17 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin Red = const { - 50: const sky.Color(0xFFFFEBEE), - 100: const sky.Color(0xFFFFCDD2), - 200: const sky.Color(0xFFEF9A9A), - 300: const sky.Color(0xFFE57373), - 400: const sky.Color(0xFFEF5350), - 500: const sky.Color(0xFFF44336), - 600: const sky.Color(0xFFE53935), - 700: const sky.Color(0xFFD32F2F), - 800: const sky.Color(0xFFC62828), - 900: const sky.Color(0xFFB71C1C), +const Map Red = const { + 50: const Color(0xFFFFEBEE), + 100: const Color(0xFFFFCDD2), + 200: const Color(0xFFEF9A9A), + 300: const Color(0xFFE57373), + 400: const Color(0xFFEF5350), + 500: const Color(0xFFF44336), + 600: const Color(0xFFE53935), + 700: const Color(0xFFD32F2F), + 800: const Color(0xFFC62828), + 900: const Color(0xFFB71C1C), }; -const Map Pink = const { - 50: const sky.Color(0xFFFCE4EC), - 100: const sky.Color(0xFFF8BBD0), - 200: const sky.Color(0xFFF48FB1), - 300: const sky.Color(0xFFF06292), - 400: const sky.Color(0xFFEC407A), - 500: const sky.Color(0xFFE91E63), - 600: const sky.Color(0xFFD81B60), - 700: const sky.Color(0xFFC2185B), - 800: const sky.Color(0xFFAD1457), - 900: const sky.Color(0xFF880E4F), +const Map Pink = const { + 50: const Color(0xFFFCE4EC), + 100: const Color(0xFFF8BBD0), + 200: const Color(0xFFF48FB1), + 300: const Color(0xFFF06292), + 400: const Color(0xFFEC407A), + 500: const Color(0xFFE91E63), + 600: const Color(0xFFD81B60), + 700: const Color(0xFFC2185B), + 800: const Color(0xFFAD1457), + 900: const Color(0xFF880E4F), }; -const Map Purple = const { - 50: const sky.Color(0xFFF3E5F5), - 100: const sky.Color(0xFFE1BEE7), - 200: const sky.Color(0xFFCE93D8), - 300: const sky.Color(0xFFBA68C8), - 400: const sky.Color(0xFFAB47BC), - 500: const sky.Color(0xFF9C27B0), - 600: const sky.Color(0xFF8E24AA), - 700: const sky.Color(0xFF7B1FA2), - 800: const sky.Color(0xFF6A1B9A), - 900: const sky.Color(0xFF4A148C), +const Map Purple = const { + 50: const Color(0xFFF3E5F5), + 100: const Color(0xFFE1BEE7), + 200: const Color(0xFFCE93D8), + 300: const Color(0xFFBA68C8), + 400: const Color(0xFFAB47BC), + 500: const Color(0xFF9C27B0), + 600: const Color(0xFF8E24AA), + 700: const Color(0xFF7B1FA2), + 800: const Color(0xFF6A1B9A), + 900: const Color(0xFF4A148C), }; -const Map DeepPurple = const { - 50: const sky.Color(0xFFEDE7F6), - 100: const sky.Color(0xFFD1C4E9), - 200: const sky.Color(0xFFB39DDB), - 300: const sky.Color(0xFF9575CD), - 400: const sky.Color(0xFF7E57C2), - 500: const sky.Color(0xFF673AB7), - 600: const sky.Color(0xFF5E35B1), - 700: const sky.Color(0xFF512DA8), - 800: const sky.Color(0xFF4527A0), - 900: const sky.Color(0xFF311B92), +const Map DeepPurple = const { + 50: const Color(0xFFEDE7F6), + 100: const Color(0xFFD1C4E9), + 200: const Color(0xFFB39DDB), + 300: const Color(0xFF9575CD), + 400: const Color(0xFF7E57C2), + 500: const Color(0xFF673AB7), + 600: const Color(0xFF5E35B1), + 700: const Color(0xFF512DA8), + 800: const Color(0xFF4527A0), + 900: const Color(0xFF311B92), }; -const Map Indigo = const { - 50: const sky.Color(0xFFE8EAF6), - 100: const sky.Color(0xFFC5CAE9), - 200: const sky.Color(0xFF9FA8DA), - 300: const sky.Color(0xFF7986CB), - 400: const sky.Color(0xFF5C6BC0), - 500: const sky.Color(0xFF3F51B5), - 600: const sky.Color(0xFF3949AB), - 700: const sky.Color(0xFF303F9F), - 800: const sky.Color(0xFF283593), - 900: const sky.Color(0xFF1A237E), +const Map Indigo = const { + 50: const Color(0xFFE8EAF6), + 100: const Color(0xFFC5CAE9), + 200: const Color(0xFF9FA8DA), + 300: const Color(0xFF7986CB), + 400: const Color(0xFF5C6BC0), + 500: const Color(0xFF3F51B5), + 600: const Color(0xFF3949AB), + 700: const Color(0xFF303F9F), + 800: const Color(0xFF283593), + 900: const Color(0xFF1A237E), }; -const Map Blue = const { - 50: const sky.Color(0xFFE3F2FD), - 100: const sky.Color(0xFFBBDEFB), - 200: const sky.Color(0xFF90CAF9), - 300: const sky.Color(0xFF64B5F6), - 400: const sky.Color(0xFF42A5F5), - 500: const sky.Color(0xFF2196F3), - 600: const sky.Color(0xFF1E88E5), - 700: const sky.Color(0xFF1976D2), - 800: const sky.Color(0xFF1565C0), - 900: const sky.Color(0xFF0D47A1), +const Map Blue = const { + 50: const Color(0xFFE3F2FD), + 100: const Color(0xFFBBDEFB), + 200: const Color(0xFF90CAF9), + 300: const Color(0xFF64B5F6), + 400: const Color(0xFF42A5F5), + 500: const Color(0xFF2196F3), + 600: const Color(0xFF1E88E5), + 700: const Color(0xFF1976D2), + 800: const Color(0xFF1565C0), + 900: const Color(0xFF0D47A1), }; -const Map LightBlue = const { - 50: const sky.Color(0xFFE1F5FE), - 100: const sky.Color(0xFFB3E5FC), - 200: const sky.Color(0xFF81D4FA), - 300: const sky.Color(0xFF4FC3F7), - 400: const sky.Color(0xFF29B6F6), - 500: const sky.Color(0xFF03A9F4), - 600: const sky.Color(0xFF039BE5), - 700: const sky.Color(0xFF0288D1), - 800: const sky.Color(0xFF0277BD), - 900: const sky.Color(0xFF01579B), +const Map LightBlue = const { + 50: const Color(0xFFE1F5FE), + 100: const Color(0xFFB3E5FC), + 200: const Color(0xFF81D4FA), + 300: const Color(0xFF4FC3F7), + 400: const Color(0xFF29B6F6), + 500: const Color(0xFF03A9F4), + 600: const Color(0xFF039BE5), + 700: const Color(0xFF0288D1), + 800: const Color(0xFF0277BD), + 900: const Color(0xFF01579B), }; -const Map Cyan = const { - 50: const sky.Color(0xFFE0F7FA), - 100: const sky.Color(0xFFB2EBF2), - 200: const sky.Color(0xFF80DEEA), - 300: const sky.Color(0xFF4DD0E1), - 400: const sky.Color(0xFF26C6DA), - 500: const sky.Color(0xFF00BCD4), - 600: const sky.Color(0xFF00ACC1), - 700: const sky.Color(0xFF0097A7), - 800: const sky.Color(0xFF00838F), - 900: const sky.Color(0xFF006064), +const Map Cyan = const { + 50: const Color(0xFFE0F7FA), + 100: const Color(0xFFB2EBF2), + 200: const Color(0xFF80DEEA), + 300: const Color(0xFF4DD0E1), + 400: const Color(0xFF26C6DA), + 500: const Color(0xFF00BCD4), + 600: const Color(0xFF00ACC1), + 700: const Color(0xFF0097A7), + 800: const Color(0xFF00838F), + 900: const Color(0xFF006064), }; -const Map Teal = const { - 50: const sky.Color(0xFFE0F2F1), - 100: const sky.Color(0xFFB2DFDB), - 200: const sky.Color(0xFF80CBC4), - 300: const sky.Color(0xFF4DB6AC), - 400: const sky.Color(0xFF26A69A), - 500: const sky.Color(0xFF009688), - 600: const sky.Color(0xFF00897B), - 700: const sky.Color(0xFF00796B), - 800: const sky.Color(0xFF00695C), - 900: const sky.Color(0xFF004D40), +const Map Teal = const { + 50: const Color(0xFFE0F2F1), + 100: const Color(0xFFB2DFDB), + 200: const Color(0xFF80CBC4), + 300: const Color(0xFF4DB6AC), + 400: const Color(0xFF26A69A), + 500: const Color(0xFF009688), + 600: const Color(0xFF00897B), + 700: const Color(0xFF00796B), + 800: const Color(0xFF00695C), + 900: const Color(0xFF004D40), }; -const Map Green = const { - 50: const sky.Color(0xFFE8F5E9), - 100: const sky.Color(0xFFC8E6C9), - 200: const sky.Color(0xFFA5D6A7), - 300: const sky.Color(0xFF81C784), - 400: const sky.Color(0xFF66BB6A), - 500: const sky.Color(0xFF4CAF50), - 600: const sky.Color(0xFF43A047), - 700: const sky.Color(0xFF388E3C), - 800: const sky.Color(0xFF2E7D32), - 900: const sky.Color(0xFF1B5E20), +const Map Green = const { + 50: const Color(0xFFE8F5E9), + 100: const Color(0xFFC8E6C9), + 200: const Color(0xFFA5D6A7), + 300: const Color(0xFF81C784), + 400: const Color(0xFF66BB6A), + 500: const Color(0xFF4CAF50), + 600: const Color(0xFF43A047), + 700: const Color(0xFF388E3C), + 800: const Color(0xFF2E7D32), + 900: const Color(0xFF1B5E20), }; -const Map LightGreen = const { - 50: const sky.Color(0xFFF1F8E9), - 100: const sky.Color(0xFFDCEDC8), - 200: const sky.Color(0xFFC5E1A5), - 300: const sky.Color(0xFFAED581), - 400: const sky.Color(0xFF9CCC65), - 500: const sky.Color(0xFF8BC34A), - 600: const sky.Color(0xFF7CB342), - 700: const sky.Color(0xFF689F38), - 800: const sky.Color(0xFF558B2F), - 900: const sky.Color(0xFF33691E), +const Map LightGreen = const { + 50: const Color(0xFFF1F8E9), + 100: const Color(0xFFDCEDC8), + 200: const Color(0xFFC5E1A5), + 300: const Color(0xFFAED581), + 400: const Color(0xFF9CCC65), + 500: const Color(0xFF8BC34A), + 600: const Color(0xFF7CB342), + 700: const Color(0xFF689F38), + 800: const Color(0xFF558B2F), + 900: const Color(0xFF33691E), }; -const Map Lime = const { - 50: const sky.Color(0xFFF9FBE7), - 100: const sky.Color(0xFFF0F4C3), - 200: const sky.Color(0xFFE6EE9C), - 300: const sky.Color(0xFFDCE775), - 400: const sky.Color(0xFFD4E157), - 500: const sky.Color(0xFFCDDC39), - 600: const sky.Color(0xFFC0CA33), - 700: const sky.Color(0xFFAFB42B), - 800: const sky.Color(0xFF9E9D24), - 900: const sky.Color(0xFF827717), +const Map Lime = const { + 50: const Color(0xFFF9FBE7), + 100: const Color(0xFFF0F4C3), + 200: const Color(0xFFE6EE9C), + 300: const Color(0xFFDCE775), + 400: const Color(0xFFD4E157), + 500: const Color(0xFFCDDC39), + 600: const Color(0xFFC0CA33), + 700: const Color(0xFFAFB42B), + 800: const Color(0xFF9E9D24), + 900: const Color(0xFF827717), }; -const Map Yellow = const { - 50: const sky.Color(0xFFFFFDE7), - 100: const sky.Color(0xFFFFF9C4), - 200: const sky.Color(0xFFFFF59D), - 300: const sky.Color(0xFFFFF176), - 400: const sky.Color(0xFFFFEE58), - 500: const sky.Color(0xFFFFEB3B), - 600: const sky.Color(0xFFFDD835), - 700: const sky.Color(0xFFFBC02D), - 800: const sky.Color(0xFFF9A825), - 900: const sky.Color(0xFFF57F17), +const Map Yellow = const { + 50: const Color(0xFFFFFDE7), + 100: const Color(0xFFFFF9C4), + 200: const Color(0xFFFFF59D), + 300: const Color(0xFFFFF176), + 400: const Color(0xFFFFEE58), + 500: const Color(0xFFFFEB3B), + 600: const Color(0xFFFDD835), + 700: const Color(0xFFFBC02D), + 800: const Color(0xFFF9A825), + 900: const Color(0xFFF57F17), }; -const Map Amber = const { - 50: const sky.Color(0xFFFFF8E1), - 100: const sky.Color(0xFFFFECB3), - 200: const sky.Color(0xFFFFE082), - 300: const sky.Color(0xFFFFD54F), - 400: const sky.Color(0xFFFFCA28), - 500: const sky.Color(0xFFFFC107), - 600: const sky.Color(0xFFFFB300), - 700: const sky.Color(0xFFFFA000), - 800: const sky.Color(0xFFFF8F00), - 900: const sky.Color(0xFFFF6F00), +const Map Amber = const { + 50: const Color(0xFFFFF8E1), + 100: const Color(0xFFFFECB3), + 200: const Color(0xFFFFE082), + 300: const Color(0xFFFFD54F), + 400: const Color(0xFFFFCA28), + 500: const Color(0xFFFFC107), + 600: const Color(0xFFFFB300), + 700: const Color(0xFFFFA000), + 800: const Color(0xFFFF8F00), + 900: const Color(0xFFFF6F00), }; -const Map Orange = const { - 50: const sky.Color(0xFFFFF3E0), - 100: const sky.Color(0xFFFFE0B2), - 200: const sky.Color(0xFFFFCC80), - 300: const sky.Color(0xFFFFB74D), - 400: const sky.Color(0xFFFFA726), - 500: const sky.Color(0xFFFF9800), - 600: const sky.Color(0xFFFB8C00), - 700: const sky.Color(0xFFF57C00), - 800: const sky.Color(0xFFEF6C00), - 900: const sky.Color(0xFFE65100), +const Map Orange = const { + 50: const Color(0xFFFFF3E0), + 100: const Color(0xFFFFE0B2), + 200: const Color(0xFFFFCC80), + 300: const Color(0xFFFFB74D), + 400: const Color(0xFFFFA726), + 500: const Color(0xFFFF9800), + 600: const Color(0xFFFB8C00), + 700: const Color(0xFFF57C00), + 800: const Color(0xFFEF6C00), + 900: const Color(0xFFE65100), }; -const Map DeepOrange = const { - 50: const sky.Color(0xFFFBE9E7), - 100: const sky.Color(0xFFFFCCBC), - 200: const sky.Color(0xFFFFAB91), - 300: const sky.Color(0xFFFF8A65), - 400: const sky.Color(0xFFFF7043), - 500: const sky.Color(0xFFFF5722), - 600: const sky.Color(0xFFF4511E), - 700: const sky.Color(0xFFE64A19), - 800: const sky.Color(0xFFD84315), - 900: const sky.Color(0xFFBF360C), +const Map DeepOrange = const { + 50: const Color(0xFFFBE9E7), + 100: const Color(0xFFFFCCBC), + 200: const Color(0xFFFFAB91), + 300: const Color(0xFFFF8A65), + 400: const Color(0xFFFF7043), + 500: const Color(0xFFFF5722), + 600: const Color(0xFFF4511E), + 700: const Color(0xFFE64A19), + 800: const Color(0xFFD84315), + 900: const Color(0xFFBF360C), }; -const Map Brown = const { - 50: const sky.Color(0xFFEFEBE9), - 100: const sky.Color(0xFFD7CCC8), - 200: const sky.Color(0xFFBCAAA4), - 300: const sky.Color(0xFFA1887F), - 400: const sky.Color(0xFF8D6E63), - 500: const sky.Color(0xFF795548), - 600: const sky.Color(0xFF6D4C41), - 700: const sky.Color(0xFF5D4037), - 800: const sky.Color(0xFF4E342E), - 900: const sky.Color(0xFF3E2723), +const Map Brown = const { + 50: const Color(0xFFEFEBE9), + 100: const Color(0xFFD7CCC8), + 200: const Color(0xFFBCAAA4), + 300: const Color(0xFFA1887F), + 400: const Color(0xFF8D6E63), + 500: const Color(0xFF795548), + 600: const Color(0xFF6D4C41), + 700: const Color(0xFF5D4037), + 800: const Color(0xFF4E342E), + 900: const Color(0xFF3E2723), }; -const Map Grey = const { - 50: const sky.Color(0xFFFAFAFA), - 100: const sky.Color(0xFFF5F5F5), - 200: const sky.Color(0xFFEEEEEE), - 300: const sky.Color(0xFFE0E0E0), - 400: const sky.Color(0xFFBDBDBD), - 500: const sky.Color(0xFF9E9E9E), - 600: const sky.Color(0xFF757575), - 700: const sky.Color(0xFF616161), - 800: const sky.Color(0xFF424242), - 900: const sky.Color(0xFF212121), +const Map Grey = const { + 50: const Color(0xFFFAFAFA), + 100: const Color(0xFFF5F5F5), + 200: const Color(0xFFEEEEEE), + 300: const Color(0xFFE0E0E0), + 400: const Color(0xFFBDBDBD), + 500: const Color(0xFF9E9E9E), + 600: const Color(0xFF757575), + 700: const Color(0xFF616161), + 800: const Color(0xFF424242), + 900: const Color(0xFF212121), }; -const Map BlueGrey = const { - 50: const sky.Color(0xFFECEFF1), - 100: const sky.Color(0xFFCFD8DC), - 200: const sky.Color(0xFFB0BEC5), - 300: const sky.Color(0xFF90A4AE), - 400: const sky.Color(0xFF78909C), - 500: const sky.Color(0xFF607D8B), - 600: const sky.Color(0xFF546E7A), - 700: const sky.Color(0xFF455A64), - 800: const sky.Color(0xFF37474F), - 900: const sky.Color(0xFF263238), -}; \ No newline at end of file +const Map BlueGrey = const { + 50: const Color(0xFFECEFF1), + 100: const Color(0xFFCFD8DC), + 200: const Color(0xFFB0BEC5), + 300: const Color(0xFF90A4AE), + 400: const Color(0xFF78909C), + 500: const Color(0xFF607D8B), + 600: const Color(0xFF546E7A), + 700: const Color(0xFF455A64), + 800: const Color(0xFF37474F), + 900: const Color(0xFF263238), +};