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.
28 lines
749 B
Dart
28 lines
749 B
Dart
import 'dart:typed_data';
|
|
|
|
import 'package:cutdex_sdk/project.dart';
|
|
import 'package:cutdex_sdk/timeline_ui.dart';
|
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
|
|
import 'media_thumbnails.dart';
|
|
import 'media_waveforms.dart';
|
|
|
|
part 'media_presentations.g.dart';
|
|
|
|
@riverpod
|
|
Future<Uint8List?> mediaCover(
|
|
Ref ref,
|
|
AssetDocument asset, {
|
|
int timeMilliseconds = 0,
|
|
}) => ref
|
|
.watch(mediaThumbnailsProvider)
|
|
.load(asset, timeMilliseconds: timeMilliseconds);
|
|
|
|
@riverpod
|
|
Future<double?> mediaDuration(Ref ref, AssetDocument asset) =>
|
|
ref.watch(mediaThumbnailsProvider).duration(asset);
|
|
|
|
@riverpod
|
|
Future<TimelineWaveform?> mediaWaveform(Ref ref, AssetDocument asset) =>
|
|
ref.watch(mediaWaveformsProvider).load(asset);
|