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.
24 lines
569 B
Dart
24 lines
569 B
Dart
import 'package:path/path.dart' as p;
|
|
import 'package:sqlite3/sqlite3.dart';
|
|
|
|
/// Holds a competing writer without depending on the SDK's table layout.
|
|
void Function() blockProjectWrites(String projectPath) {
|
|
final database = sqlite3.open(p.join(projectPath, 'project.sqlite'));
|
|
try {
|
|
database.execute('BEGIN IMMEDIATE');
|
|
} catch (_) {
|
|
database.close();
|
|
rethrow;
|
|
}
|
|
var released = false;
|
|
return () {
|
|
if (released) return;
|
|
released = true;
|
|
try {
|
|
database.execute('ROLLBACK');
|
|
} finally {
|
|
database.close();
|
|
}
|
|
};
|
|
}
|