Skip to content

Commit bd6f7fa

Browse files
committed
file configurations
1 parent 2869c5b commit bd6f7fa

29 files changed

+158
-159
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ app.*.map.json
4444
/android/app/debug
4545
/android/app/profile
4646
/android/app/release
47+
/dist/

lib/core/widgets/alert_dialogues/add_project.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:cookethflow/core/widgets/build_project.dart';
1+
import 'package:cookethflow/core/widgets/buttons/build_project.dart';
22
import 'package:cookethflow/providers/flowmanage_provider.dart';
33
import 'package:flutter/material.dart';
44
import 'package:phosphor_flutter/phosphor_flutter.dart';

lib/core/widgets/alert_dialogues/export_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:cookethflow/core/widgets/export_option_widget.dart';
1+
import 'package:cookethflow/core/widgets/buttons/export_option_widget.dart';
22
import 'package:cookethflow/providers/workspace_provider.dart';
33
import 'package:flutter/material.dart';
44
import 'package:phosphor_flutter/phosphor_flutter.dart';

lib/core/widgets/popup_box.dart renamed to lib/core/widgets/alert_dialogues/popup_box.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'dart:io';
22

33
import 'package:cookethflow/core/services/file_services.dart';
44
import 'package:cookethflow/core/services/supabase_service.dart';
5-
import 'package:cookethflow/core/theme/colors.dart';
65
import 'package:file_selector/file_selector.dart';
76
import 'package:flutter/material.dart';
87
import 'package:provider/provider.dart';
File renamed without changes.
Lines changed: 2 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:cookethflow/core/widgets/painters/connector_painter.dart';
12
import 'package:cookethflow/models/connection.dart';
23
import 'package:cookethflow/providers/workspace_provider.dart';
34
import 'package:flutter/material.dart';
@@ -37,122 +38,4 @@ class Connector extends StatelessWidget {
3738
},
3839
);
3940
}
40-
}
41-
42-
class ConnectorPainter extends CustomPainter {
43-
final ConnectionPoint connectionPoint;
44-
final bool isHovered;
45-
final Color color;
46-
47-
ConnectorPainter({
48-
required this.connectionPoint,
49-
required this.isHovered,
50-
required this.color,
51-
});
52-
53-
@override
54-
void paint(Canvas canvas, Size size) {
55-
final paint = Paint()
56-
..color = color
57-
..style = isHovered ? PaintingStyle.fill : PaintingStyle.stroke
58-
..strokeWidth = 2.0;
59-
60-
final path = Path();
61-
// final radius = 4.0; // Radius for rounded corners
62-
// final arrowSize = size.width * 0.4; // Size of the arrow part
63-
64-
switch (connectionPoint) {
65-
case ConnectionPoint.top:
66-
// Start from bottom-left with rounded corner
67-
path.moveTo(size.width * 0.2, size.height * 0.6);
68-
// Line to middle-top
69-
path.lineTo(size.width * 0.5, size.height * 0.2);
70-
// Line to bottom-right
71-
path.lineTo(size.width * 0.8, size.height * 0.6);
72-
73-
// Create rounded corners using quadratic bezier curves
74-
path.quadraticBezierTo(
75-
size.width * 0.8, size.height * 0.7,
76-
size.width * 0.7, size.height * 0.7,
77-
);
78-
// Bottom line
79-
path.lineTo(size.width * 0.3, size.height * 0.7);
80-
// Final rounded corner
81-
path.quadraticBezierTo(
82-
size.width * 0.2, size.height * 0.7,
83-
size.width * 0.2, size.height * 0.6,
84-
);
85-
break;
86-
87-
case ConnectionPoint.bottom:
88-
// Rotate the top arrow 180 degrees
89-
canvas.translate(size.width / 2, size.height / 2);
90-
canvas.rotate(3.14159);
91-
canvas.translate(-size.width / 2, -size.height / 2);
92-
93-
path.moveTo(size.width * 0.2, size.height * 0.6);
94-
path.lineTo(size.width * 0.5, size.height * 0.2);
95-
path.lineTo(size.width * 0.8, size.height * 0.6);
96-
path.quadraticBezierTo(
97-
size.width * 0.8, size.height * 0.7,
98-
size.width * 0.7, size.height * 0.7,
99-
);
100-
path.lineTo(size.width * 0.3, size.height * 0.7);
101-
path.quadraticBezierTo(
102-
size.width * 0.2, size.height * 0.7,
103-
size.width * 0.2, size.height * 0.6,
104-
);
105-
break;
106-
107-
case ConnectionPoint.left:
108-
// Rotate the top arrow 270 degrees
109-
canvas.translate(size.width / 2, size.height / 2);
110-
canvas.rotate(-1.5708);
111-
canvas.translate(-size.width / 2, -size.height / 2);
112-
113-
path.moveTo(size.width * 0.2, size.height * 0.6);
114-
path.lineTo(size.width * 0.5, size.height * 0.2);
115-
path.lineTo(size.width * 0.8, size.height * 0.6);
116-
path.quadraticBezierTo(
117-
size.width * 0.8, size.height * 0.7,
118-
size.width * 0.7, size.height * 0.7,
119-
);
120-
path.lineTo(size.width * 0.3, size.height * 0.7);
121-
path.quadraticBezierTo(
122-
size.width * 0.2, size.height * 0.7,
123-
size.width * 0.2, size.height * 0.6,
124-
);
125-
break;
126-
127-
case ConnectionPoint.right:
128-
// Rotate the top arrow 90 degrees
129-
canvas.translate(size.width / 2, size.height / 2);
130-
canvas.rotate(1.5708);
131-
canvas.translate(-size.width / 2, -size.height / 2);
132-
133-
path.moveTo(size.width * 0.2, size.height * 0.6);
134-
path.lineTo(size.width * 0.5, size.height * 0.2);
135-
path.lineTo(size.width * 0.8, size.height * 0.6);
136-
path.quadraticBezierTo(
137-
size.width * 0.8, size.height * 0.7,
138-
size.width * 0.7, size.height * 0.7,
139-
);
140-
path.lineTo(size.width * 0.3, size.height * 0.7);
141-
path.quadraticBezierTo(
142-
size.width * 0.2, size.height * 0.7,
143-
size.width * 0.2, size.height * 0.6,
144-
);
145-
break;
146-
}
147-
148-
path.close();
149-
canvas.drawPath(path, paint);
150-
}
151-
152-
@override
153-
bool shouldRepaint(ConnectorPainter oldDelegate) {
154-
return oldDelegate.connectionPoint != connectionPoint ||
155-
oldDelegate.isHovered != isHovered ||
156-
oldDelegate.color != color;
157-
}
158-
}
41+
}
File renamed without changes.
File renamed without changes.

lib/core/widgets/drawers/dashboard_drawer.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import 'dart:io';
22

33
import 'package:cookethflow/core/services/supabase_service.dart';
4-
import 'package:cookethflow/core/widgets/popup_box.dart';
5-
import 'package:cookethflow/screens/log_in.dart';
6-
import 'package:cookethflow/screens/sign_up.dart';
4+
import 'package:cookethflow/core/widgets/alert_dialogues/popup_box.dart';
5+
import 'package:cookethflow/screens/auth_screens/log_in.dart';
6+
import 'package:cookethflow/screens/auth_screens/sign_up.dart';
77
import 'package:flutter/material.dart';
88
import 'package:phosphor_flutter/phosphor_flutter.dart';
99
import 'package:provider/provider.dart';

0 commit comments

Comments
 (0)