Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bhav-khurana committed Jan 16, 2024
1 parent 372b63a commit 29f0187
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 150 deletions.
2 changes: 1 addition & 1 deletion colorpicker/lib/widgets/color_compare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ColorCompare extends StatefulWidget {
class _ColorCompareState extends State<ColorCompare> {
@override
Widget build(BuildContext context) {
return Container(
return SizedBox(
width: 130,
height: 70,
child: Row(
Expand Down
153 changes: 4 additions & 149 deletions lib/core/path_with_action_history.dart
Original file line number Diff line number Diff line change
@@ -1,169 +1,24 @@
import 'dart:typed_data';
import 'dart:ui';

class PathWithActionHistory implements Path {
class PathWithActionHistory extends Path {
final actions = <PathAction>[];

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<Offset> 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();
}
}

Expand Down

0 comments on commit 29f0187

Please sign in to comment.