feat: initial Cutdex application
Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
This commit is contained in:
commit
27e77fff39
718 files changed
+183958
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../features/assistant/agent_conversation_service.dart';
|
||||
import '../workspace/projects.dart';
|
||||
import 'app_update_bridge.dart';
|
||||
|
||||
Future<void> prepareForAppUpdateQuit(Ref ref) async {
|
||||
await ref.read(agentConversationRegistryProvider).cancelAll();
|
||||
await ref.read(projectsProvider.notifier).prepareToQuit();
|
||||
}
|
||||
|
||||
// Keep the saved workspace recoverable if the updater cannot be launched.
|
||||
Future<void> installWindowsUpdate(Ref ref) async {
|
||||
final bridge = ref.read(appUpdateBridgeProvider);
|
||||
await bridge.validateInstall();
|
||||
final registry = ref.read(agentConversationRegistryProvider);
|
||||
await registry.cancelAll();
|
||||
await registry.whilePaused(() async {
|
||||
final projects = ref.read(projectsProvider.notifier);
|
||||
await ref.read(projectsProvider.future);
|
||||
final snapshot = ref.read(projectsProvider).requireValue;
|
||||
await projects.prepareToQuit();
|
||||
try {
|
||||
await bridge.install();
|
||||
} catch (_) {
|
||||
ref.invalidate(projectsProvider);
|
||||
if (snapshot.activeProject case final project?) {
|
||||
await ref
|
||||
.read(projectsProvider.notifier)
|
||||
.open(
|
||||
project.path,
|
||||
expectedId: project.id,
|
||||
timelineId: snapshot.timeline?.id,
|
||||
);
|
||||
}
|
||||
rethrow;
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user