Skip to content

Commit 868fe9b

Browse files
committed
mac getting ready
1 parent 5e88028 commit 868fe9b

22 files changed

Lines changed: 979 additions & 188 deletions
4.24 MB
Loading

‎assets/AppIcon.icon/icon.json‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"fill" : "system-dark",
3+
"groups" : [
4+
{
5+
"layers" : [
6+
{
7+
"blend-mode" : "normal",
8+
"glass" : false,
9+
"hidden" : false,
10+
"image-name" : "icon.png",
11+
"name" : "icon",
12+
"position" : {
13+
"scale" : 0.5,
14+
"translation-in-points" : [
15+
0,
16+
0
17+
]
18+
}
19+
}
20+
],
21+
"shadow" : {
22+
"kind" : "neutral",
23+
"opacity" : 0.5
24+
},
25+
"translucency" : {
26+
"enabled" : true,
27+
"value" : 0.5
28+
}
29+
}
30+
],
31+
"supported-platforms" : {
32+
"squares" : "shared"
33+
}
34+
}

‎assets/icon.pxd‎

-191 Bytes
Binary file not shown.

‎lib/main.dart‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ import 'package:flutter/material.dart';
22
import 'package:provider/provider.dart';
33
import 'providers/project_provider.dart';
44
import 'screens/home_screen.dart';
5+
import 'services/preferences_service.dart';
56

67
void main() async {
78
WidgetsFlutterBinding.ensureInitialized();
9+
10+
// Initialize preferences service before app starts
11+
await PreferencesService().initialize();
12+
813
runApp(const MainApp());
914
}
1015

‎lib/models/project.dart‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ class LaunchStep {
2727
final String? message;
2828
final List<String> logs;
2929
final DateTime? startTime;
30+
final DateTime? endTime;
3031

3132
LaunchStep({
3233
required this.title,
3334
required this.status,
3435
this.message,
3536
this.logs = const [],
3637
DateTime? startTime,
38+
this.endTime,
3739
}) : startTime = startTime ?? DateTime.now();
3840

3941
LaunchStep copyWith({
@@ -42,30 +44,28 @@ class LaunchStep {
4244
String? message,
4345
List<String>? logs,
4446
DateTime? startTime,
47+
DateTime? endTime,
4548
}) {
4649
return LaunchStep(
4750
title: title ?? this.title,
4851
status: status ?? this.status,
4952
message: message ?? this.message,
5053
logs: logs ?? this.logs,
5154
startTime: startTime ?? this.startTime,
55+
endTime: endTime ?? this.endTime,
5256
);
5357
}
5458

5559
LaunchStep addLog(String log) {
5660
return copyWith(logs: [...logs, log]);
5761
}
5862

59-
/// Get the duration in seconds since step started
60-
double? get durationSeconds {
61-
if (startTime == null) return null;
62-
return DateTime.now().difference(startTime!).inMilliseconds / 1000.0;
63-
}
64-
6563
/// Get title with duration if step is completed
6664
String get titleWithDuration {
6765
if (status == LaunchStepStatus.completed && startTime != null) {
68-
final duration = DateTime.now().difference(startTime!).inMilliseconds / 1000.0;
66+
// Use endTime if available (fixed duration), otherwise use current time (for backward compatibility)
67+
final end = endTime ?? DateTime.now();
68+
final duration = end.difference(startTime!).inMilliseconds / 1000.0;
6969
return '$title (${duration.toStringAsFixed(1)}s)';
7070
}
7171
return title;

0 commit comments

Comments
 (0)