Gitea CI / Check code and tests (push) Successful in 6m37s
Gitea CI / Build Windows x64 app (push) Successful in 3m18s
Gitea CI / Build Android APK (push) Successful in 3m47s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m7s
Gitea CI / Assemble and validate CI artifacts (push) Successful in 50s
Gitea CI / Gitea CI passed (push) Successful in 2s
Gitea Release / Prepare draft Release (push) Successful in 9s
Gitea Release / Upload Android to draft Release (push) Successful in 16s
Gitea Release / Upload Windows to draft Release (push) Successful in 22s
Gitea Release / Verify and publish Release (push) Successful in 14s
35 lines
923 B
Dart
35 lines
923 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import '../../workspace/projects.dart';
|
|
|
|
/// Keeps the surface mounted while a timeline operation temporarily blocks edits.
|
|
class TimelineOperationRegion extends ConsumerWidget {
|
|
const TimelineOperationRegion({
|
|
super.key,
|
|
required this.projectId,
|
|
required this.child,
|
|
this.loading = false,
|
|
});
|
|
|
|
final String projectId;
|
|
final bool loading;
|
|
final Widget child;
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final creating = ref.watch(
|
|
projectsProvider.select(
|
|
(value) =>
|
|
value.value?.activeProject?.id == projectId &&
|
|
value.value?.creatingTimeline == true,
|
|
),
|
|
);
|
|
final blocked = loading || creating;
|
|
return IgnorePointer(
|
|
ignoring: blocked,
|
|
child: ExcludeFocus(excluding: blocked, child: child),
|
|
);
|
|
}
|
|
}
|