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,101 @@
|
||||
import 'package:cutdex/errors/app_failure.dart';
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
enum ProjectLocationStatus { ready, missing, unavailable, notWritable }
|
||||
|
||||
class ProjectLocationDirectory {
|
||||
const ProjectLocationDirectory();
|
||||
|
||||
Future<ProjectLocationStatus> inspect(String path) async {
|
||||
if (!p.isAbsolute(path)) return ProjectLocationStatus.unavailable;
|
||||
try {
|
||||
final directory = Directory(path);
|
||||
if (await directory.exists()) {
|
||||
await _checkWritable(directory);
|
||||
return ProjectLocationStatus.ready;
|
||||
}
|
||||
// Never recreate a missing external/network location on the system disk.
|
||||
// Its mount point may still exist even though the volume is disconnected.
|
||||
if (_isExternalPath(path)) return ProjectLocationStatus.unavailable;
|
||||
var ancestor = directory;
|
||||
while (!await ancestor.exists()) {
|
||||
if (await FileSystemEntity.type(ancestor.path, followLinks: false) !=
|
||||
FileSystemEntityType.notFound) {
|
||||
return ProjectLocationStatus.unavailable;
|
||||
}
|
||||
final parent = ancestor.parent;
|
||||
if (parent.path == ancestor.path) {
|
||||
return ProjectLocationStatus.unavailable;
|
||||
}
|
||||
ancestor = parent;
|
||||
}
|
||||
await _checkWritable(ancestor);
|
||||
return ProjectLocationStatus.missing;
|
||||
} on FileSystemException catch (error) {
|
||||
return _isPermissionError(error)
|
||||
? ProjectLocationStatus.notWritable
|
||||
: ProjectLocationStatus.unavailable;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> prepare(String path) async {
|
||||
final status = await inspect(path);
|
||||
if (status == ProjectLocationStatus.notWritable) {
|
||||
throw AppException(AppErrorCode.projectLocationNotWritable);
|
||||
}
|
||||
if (status == ProjectLocationStatus.unavailable) {
|
||||
throw AppException(AppErrorCode.projectLocationUnavailable);
|
||||
}
|
||||
try {
|
||||
final directory = Directory(path);
|
||||
if (status == ProjectLocationStatus.missing) {
|
||||
await directory.create(recursive: true);
|
||||
}
|
||||
await _checkWritable(directory);
|
||||
} on FileSystemException {
|
||||
throw AppException(AppErrorCode.projectLocationCreateFailed);
|
||||
}
|
||||
}
|
||||
|
||||
bool _isExternalPath(String path) {
|
||||
if (Platform.isWindows) {
|
||||
// Only the system drive is known to be local without a volume query.
|
||||
final systemDrive = Platform.environment['SystemDrive'];
|
||||
return systemDrive == null ||
|
||||
p.windows.rootPrefix(path).toLowerCase() !=
|
||||
'${systemDrive.toLowerCase()}\\';
|
||||
}
|
||||
final normalized = p.normalize(path);
|
||||
return const [
|
||||
'/Volumes',
|
||||
'/mnt',
|
||||
'/media',
|
||||
'/run/media',
|
||||
'/net',
|
||||
].any((root) => normalized == root || p.isWithin(root, normalized));
|
||||
}
|
||||
|
||||
bool _isPermissionError(FileSystemException error) =>
|
||||
(Platform.isWindows ? const [5, 19] : const [1, 13, 30]).contains(
|
||||
error.osError?.errorCode,
|
||||
);
|
||||
|
||||
Future<void> _checkWritable(Directory directory) async {
|
||||
final probe = File(
|
||||
p.join(
|
||||
directory.path,
|
||||
'.cutdex-write-$pid-${DateTime.now().microsecondsSinceEpoch}',
|
||||
),
|
||||
);
|
||||
var created = false;
|
||||
try {
|
||||
await probe.create(exclusive: true);
|
||||
created = true;
|
||||
} finally {
|
||||
if (created) await probe.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../project_state.dart';
|
||||
|
||||
part 'project_locator.g.dart';
|
||||
part 'project_locator.freezed.dart';
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
ProjectLocator projectLocator(Ref ref) => ProjectLocator();
|
||||
|
||||
/// Resolves a persisted location without opening the project database.
|
||||
class ProjectLocator {
|
||||
Future<ProjectLocation> locate(RecentProject project) async {
|
||||
final type = await FileSystemEntity.type(project.path, followLinks: true);
|
||||
return switch (type) {
|
||||
FileSystemEntityType.directory => ProjectLocation.available(project),
|
||||
FileSystemEntityType.notFound => ProjectLocation.unavailable(
|
||||
project,
|
||||
_missingAvailability(project.path),
|
||||
),
|
||||
_ => ProjectLocation.unavailable(project, .invalid),
|
||||
};
|
||||
}
|
||||
|
||||
ProjectAvailability _missingAvailability(String path) {
|
||||
final parts = p.split(path);
|
||||
if (parts.length >= 3 && parts[1] == 'Volumes') {
|
||||
final volume = p.join(parts[0], parts[1], parts[2]);
|
||||
if (!Directory(volume).existsSync()) return .volumeOffline;
|
||||
}
|
||||
return .missing;
|
||||
}
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ProjectLocation with _$ProjectLocation {
|
||||
const ProjectLocation._();
|
||||
const factory ProjectLocation(RecentProject project) = _ProjectLocation;
|
||||
|
||||
factory ProjectLocation.available(RecentProject project) =>
|
||||
ProjectLocation(project.copyWith(availability: .available));
|
||||
|
||||
factory ProjectLocation.unavailable(
|
||||
RecentProject project,
|
||||
ProjectAvailability availability,
|
||||
) => ProjectLocation(project.copyWith(availability: availability));
|
||||
|
||||
ProjectAvailability get availability => project.availability;
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'project_locator.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ProjectLocation {
|
||||
RecentProject get project;
|
||||
|
||||
/// Create a copy of ProjectLocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ProjectLocationCopyWith<ProjectLocation> get copyWith =>
|
||||
_$ProjectLocationCopyWithImpl<ProjectLocation>(
|
||||
this as ProjectLocation,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
final _this = this as ProjectLocation;
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is ProjectLocation &&
|
||||
(identical(other.project, _this.project) ||
|
||||
other.project == _this.project));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
final _this = this as ProjectLocation;
|
||||
return Object.hash(runtimeType, _this.project);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
final _this = this as ProjectLocation;
|
||||
return 'ProjectLocation(project: ${_this.project})';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ProjectLocationCopyWith<$Res> {
|
||||
factory $ProjectLocationCopyWith(
|
||||
ProjectLocation value,
|
||||
$Res Function(ProjectLocation) _then,
|
||||
) = _$ProjectLocationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({RecentProject project});
|
||||
|
||||
$RecentProjectCopyWith<$Res> get project;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProjectLocationCopyWithImpl<$Res>
|
||||
implements $ProjectLocationCopyWith<$Res> {
|
||||
_$ProjectLocationCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ProjectLocation _self;
|
||||
final $Res Function(ProjectLocation) _then;
|
||||
|
||||
/// Create a copy of ProjectLocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({Object? project = null}) {
|
||||
return _then(
|
||||
ProjectLocation(
|
||||
null == project
|
||||
? _self.project
|
||||
: project // ignore: cast_nullable_to_non_nullable
|
||||
as RecentProject,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of ProjectLocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$RecentProjectCopyWith<$Res> get project {
|
||||
return $RecentProjectCopyWith<$Res>(_self.project, (value) {
|
||||
return _then(_self.copyWith(project: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [ProjectLocation].
|
||||
extension ProjectLocationPatterns on ProjectLocation {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ProjectLocation value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ProjectLocation() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ProjectLocation value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ProjectLocation():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ProjectLocation value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ProjectLocation() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(RecentProject project)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ProjectLocation() when $default != null:
|
||||
return $default(_that.project);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(RecentProject project) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ProjectLocation():
|
||||
return $default(_that.project);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(RecentProject project)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ProjectLocation() when $default != null:
|
||||
return $default(_that.project);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _ProjectLocation extends ProjectLocation {
|
||||
const _ProjectLocation(this.project) : super._();
|
||||
|
||||
@override
|
||||
final RecentProject project;
|
||||
|
||||
/// Create a copy of ProjectLocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ProjectLocationCopyWith<_ProjectLocation> get copyWith =>
|
||||
__$ProjectLocationCopyWithImpl<_ProjectLocation>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _ProjectLocation &&
|
||||
(identical(other.project, project) || other.project == project));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType, project);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ProjectLocation(project: $project)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ProjectLocationCopyWith<$Res>
|
||||
implements $ProjectLocationCopyWith<$Res> {
|
||||
factory _$ProjectLocationCopyWith(
|
||||
_ProjectLocation value,
|
||||
$Res Function(_ProjectLocation) _then,
|
||||
) = __$ProjectLocationCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({RecentProject project});
|
||||
|
||||
@override
|
||||
$RecentProjectCopyWith<$Res> get project;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$ProjectLocationCopyWithImpl<$Res>
|
||||
implements _$ProjectLocationCopyWith<$Res> {
|
||||
__$ProjectLocationCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ProjectLocation _self;
|
||||
final $Res Function(_ProjectLocation) _then;
|
||||
|
||||
/// Create a copy of ProjectLocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({Object? project = null}) {
|
||||
return _then(
|
||||
_ProjectLocation(
|
||||
null == project
|
||||
? _self.project
|
||||
: project // ignore: cast_nullable_to_non_nullable
|
||||
as RecentProject,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of ProjectLocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$RecentProjectCopyWith<$Res> get project {
|
||||
return $RecentProjectCopyWith<$Res>(_self.project, (value) {
|
||||
return _then(_self.copyWith(project: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'project_locator.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(projectLocator)
|
||||
final projectLocatorProvider = ProjectLocatorProvider._();
|
||||
|
||||
final class ProjectLocatorProvider
|
||||
extends $FunctionalProvider<ProjectLocator, ProjectLocator, ProjectLocator>
|
||||
with $Provider<ProjectLocator> {
|
||||
ProjectLocatorProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'projectLocatorProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$projectLocatorHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<ProjectLocator> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
ProjectLocator create(Ref ref) {
|
||||
return projectLocator(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(ProjectLocator value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<ProjectLocator>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$projectLocatorHash() => r'b20be00ffdfc988f6e3eacd3af000be913568322';
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,70 @@
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../../persistence/app_database.dart';
|
||||
import '../project_state.dart';
|
||||
|
||||
part 'recent_projects.g.dart';
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
RecentProjectsRepository recentProjects(Ref ref) =>
|
||||
DriftRecentProjectsRepository(ref.watch(appDatabaseProvider));
|
||||
|
||||
abstract interface class RecentProjectsRepository {
|
||||
Future<String?> lastTimeline(String projectId);
|
||||
Future<void> rememberTimeline(String projectId, String timelineId);
|
||||
Future<List<RecentProject>> load();
|
||||
Future<void> save(List<RecentProject> projects);
|
||||
}
|
||||
|
||||
class DriftRecentProjectsRepository implements RecentProjectsRepository {
|
||||
DriftRecentProjectsRepository(this._database);
|
||||
|
||||
final AppDatabase _database;
|
||||
|
||||
@override
|
||||
Future<String?> lastTimeline(String projectId) =>
|
||||
(_database.select(_database.lastOpenedTimelines)
|
||||
..where((table) => table.projectId.equals(projectId)))
|
||||
.getSingleOrNull()
|
||||
.then((row) => row?.timelineId);
|
||||
|
||||
@override
|
||||
Future<void> rememberTimeline(String projectId, String timelineId) =>
|
||||
_database
|
||||
.into(_database.lastOpenedTimelines)
|
||||
.insertOnConflictUpdate(
|
||||
LastOpenedTimelinesCompanion.insert(
|
||||
projectId: projectId,
|
||||
timelineId: timelineId,
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
Future<List<RecentProject>> load() async {
|
||||
final rows = await (_database.select(
|
||||
_database.recentProjectRecords,
|
||||
)..orderBy([(table) => OrderingTerm.asc(table.position)])).get();
|
||||
return [
|
||||
for (final row in rows)
|
||||
RecentProject(id: row.id, name: row.name, path: row.path),
|
||||
];
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> save(List<RecentProject> projects) =>
|
||||
_database.transaction(() async {
|
||||
await _database.delete(_database.recentProjectRecords).go();
|
||||
await _database.batch((batch) {
|
||||
batch.insertAll(_database.recentProjectRecords, [
|
||||
for (final (position, project) in projects.indexed)
|
||||
RecentProjectRecordsCompanion.insert(
|
||||
id: project.id,
|
||||
name: project.name,
|
||||
path: project.path,
|
||||
position: position,
|
||||
),
|
||||
]);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'recent_projects.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(recentProjects)
|
||||
final recentProjectsProvider = RecentProjectsProvider._();
|
||||
|
||||
final class RecentProjectsProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
RecentProjectsRepository,
|
||||
RecentProjectsRepository,
|
||||
RecentProjectsRepository
|
||||
>
|
||||
with $Provider<RecentProjectsRepository> {
|
||||
RecentProjectsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'recentProjectsProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$recentProjectsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<RecentProjectsRepository> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
RecentProjectsRepository create(Ref ref) {
|
||||
return recentProjects(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(RecentProjectsRepository value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<RecentProjectsRepository>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$recentProjectsHash() => r'ca0054cd01bba053c99058ffadd6342bae057ed6';
|
||||
@@ -0,0 +1,12 @@
|
||||
/// Names already chosen by the caller, persisted verbatim on creation.
|
||||
final class TimelineCreationNames {
|
||||
const TimelineCreationNames({
|
||||
required this.timeline,
|
||||
required this.sequence,
|
||||
required this.storyline,
|
||||
});
|
||||
|
||||
final String timeline;
|
||||
final String sequence;
|
||||
final String storyline;
|
||||
}
|
||||
Reference in new issue
Block a user