Files
cutdex/lib/integrations/platform/media_source_reader.dart
T
lingjhf 27e77fff39 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.
2026-10-05 23:36:23 +08:00

16 lines
382 B
Dart

import 'package:filegate/filegate.dart';
/// Streams provider documents without exposing filegate to workspace logic.
class MediaSourceReader {
const MediaSourceReader();
Stream<List<int>> openRead(Uri uri) async* {
final session = const Filegate().openRead(uri.toString());
try {
yield* session.stream;
} finally {
await session.cancel();
}
}
}