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.
42 lines
1.0 KiB
Dart
42 lines
1.0 KiB
Dart
import 'package:cutdex_sdk/project.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
import '../errors/app_failure.dart';
|
|
|
|
part 'project_state.freezed.dart';
|
|
|
|
enum ProjectAvailability {
|
|
available,
|
|
missing,
|
|
volumeOffline,
|
|
invalid,
|
|
unavailable;
|
|
|
|
bool get canOpen => this == available;
|
|
}
|
|
|
|
@freezed
|
|
abstract class RecentProject with _$RecentProject {
|
|
const factory RecentProject({
|
|
required String id,
|
|
required String name,
|
|
required String path,
|
|
@Default(ProjectAvailability.available) ProjectAvailability availability,
|
|
}) = _RecentProject;
|
|
}
|
|
|
|
@freezed
|
|
abstract class ProjectState with _$ProjectState {
|
|
const factory ProjectState({
|
|
@Default([]) List<RecentProject> recent,
|
|
RecentProject? activeProject,
|
|
@Default([]) List<TimelineSummary> timelines,
|
|
@Default([]) List<AssetDocument> assets,
|
|
TimelineDocument? timeline,
|
|
@Default(false) bool projectBusy,
|
|
String? openingTimelineId,
|
|
@Default(false) bool creatingTimeline,
|
|
AppFailure? error,
|
|
}) = _ProjectState;
|
|
}
|