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.
20 lines
519 B
Dart
20 lines
519 B
Dart
import 'dart:convert';
|
|
import 'dart:io';
|
|
|
|
final class RealMediaReport {
|
|
RealMediaReport(this.file, {required Map<String, Object?> metadata})
|
|
: metadata = Map.unmodifiable(metadata);
|
|
|
|
final File file;
|
|
final Map<String, Object?> metadata;
|
|
final files = <Map<String, Object?>>[];
|
|
|
|
void save() {
|
|
final temporary = File('${file.path}.part');
|
|
temporary.writeAsStringSync(
|
|
const JsonEncoder.withIndent(' ').convert({...metadata, 'files': files}),
|
|
);
|
|
temporary.renameSync(file.path);
|
|
}
|
|
}
|