diff --git a/colorpicker/lib/widgets/color_compare.dart b/colorpicker/lib/widgets/color_compare.dart index a7c6c8a0..c1b5bce2 100644 --- a/colorpicker/lib/widgets/color_compare.dart +++ b/colorpicker/lib/widgets/color_compare.dart @@ -17,7 +17,7 @@ class ColorCompare extends StatefulWidget { class _ColorCompareState extends State { @override Widget build(BuildContext context) { - return Container( + return SizedBox( width: 130, height: 70, child: Row( diff --git a/lib/core/path_with_action_history.dart b/lib/core/path_with_action_history.dart index 78a411ce..75bffb9b 100644 --- a/lib/core/path_with_action_history.dart +++ b/lib/core/path_with_action_history.dart @@ -1,169 +1,24 @@ -import 'dart:typed_data'; import 'dart:ui'; -class PathWithActionHistory implements Path { +class PathWithActionHistory extends Path { final actions = []; - final _path = Path(); - @override void moveTo(double x, double y) { actions.add(MoveToAction(x, y)); - _path.moveTo(x, y); + super.moveTo(x, y); } @override void lineTo(double x, double y) { actions.add(LineToAction(x, y)); - _path.lineTo(x, y); + super.lineTo(x, y); } @override void close() { actions.add(const CloseAction()); - _path.close(); - } - - @override - PathFillType get fillType => _path.fillType; - - @override - void set fillType(PathFillType value) => _path.fillType = value; - - @override - void addArc(Rect oval, double startAngle, double sweepAngle) { - // TODO: implement addArc - } - - @override - void addOval(Rect oval) { - // TODO: implement addOval - } - - @override - void addPath(Path path, Offset offset, {Float64List? matrix4}) { - // TODO: implement addPath - } - - @override - void addPolygon(List points, bool close) { - // TODO: implement addPolygon - } - - @override - void addRRect(RRect rrect) { - // TODO: implement addRRect - } - - @override - void addRect(Rect rect) { - // TODO: implement addRect - } - - @override - void arcTo( - Rect rect, double startAngle, double sweepAngle, bool forceMoveTo) { - // TODO: implement arcTo - } - - @override - void arcToPoint(Offset arcEnd, - {Radius radius = Radius.zero, - double rotation = 0.0, - bool largeArc = false, - bool clockwise = true}) { - // TODO: implement arcToPoint - } - - @override - PathMetrics computeMetrics({bool forceClosed = false}) { - // TODO: implement computeMetrics - throw UnimplementedError(); - } - - @override - void conicTo(double x1, double y1, double x2, double y2, double w) { - // TODO: implement conicTo - } - - @override - bool contains(Offset point) { - // TODO: implement contains - throw UnimplementedError(); - } - - @override - void cubicTo( - double x1, double y1, double x2, double y2, double x3, double y3) { - // TODO: implement cubicTo - } - - @override - void extendWithPath(Path path, Offset offset, {Float64List? matrix4}) { - // TODO: implement extendWithPath - } - - @override - Rect getBounds() { - // TODO: implement getBounds - throw UnimplementedError(); - } - - @override - void quadraticBezierTo(double x1, double y1, double x2, double y2) { - // TODO: implement quadraticBezierTo - } - - @override - void relativeArcToPoint(Offset arcEndDelta, - {Radius radius = Radius.zero, - double rotation = 0.0, - bool largeArc = false, - bool clockwise = true}) { - // TODO: implement relativeArcToPoint - } - - @override - void relativeConicTo(double x1, double y1, double x2, double y2, double w) { - // TODO: implement relativeConicTo - } - - @override - void relativeCubicTo( - double x1, double y1, double x2, double y2, double x3, double y3) { - // TODO: implement relativeCubicTo - } - - @override - void relativeLineTo(double dx, double dy) { - // TODO: implement relativeLineTo - } - - @override - void relativeMoveTo(double dx, double dy) { - // TODO: implement relativeMoveTo - } - - @override - void relativeQuadraticBezierTo(double x1, double y1, double x2, double y2) { - // TODO: implement relativeQuadraticBezierTo - } - - @override - void reset() { - // TODO: implement reset - } - - @override - Path shift(Offset offset) { - // TODO: implement shift - throw UnimplementedError(); - } - - @override - Path transform(Float64List matrix4) { - // TODO: implement transform - throw UnimplementedError(); + super.close(); } }