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.
77 lines
2.3 KiB
Dart
77 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'properties_content.dart';
|
|
|
|
class PropertiesEditorPage extends StatelessWidget {
|
|
const PropertiesEditorPage({
|
|
super.key,
|
|
required this.projectId,
|
|
required this.timelineId,
|
|
});
|
|
final String projectId;
|
|
final String timelineId;
|
|
@override
|
|
Widget build(BuildContext context) => PropertiesContent(
|
|
key: const Key('properties-editor-page'),
|
|
projectId: projectId,
|
|
timelineId: timelineId,
|
|
categoryHeaderHeight: 48,
|
|
categoryControls: (context, categories, selected, onSelected) => Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
child: DropdownButton<PropertyCategory>(
|
|
key: const Key('property-category-picker'),
|
|
isExpanded: true,
|
|
underline: const SizedBox.shrink(),
|
|
value: selected,
|
|
items: [
|
|
for (final category in categories)
|
|
DropdownMenuItem(
|
|
value: category,
|
|
child: Text(category.label(context)),
|
|
),
|
|
],
|
|
onChanged: (category) {
|
|
if (category != null) onSelected(category);
|
|
},
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
class PropertiesToolPanel extends StatelessWidget {
|
|
const PropertiesToolPanel({
|
|
super.key,
|
|
required this.projectId,
|
|
required this.timelineId,
|
|
});
|
|
final String projectId;
|
|
final String timelineId;
|
|
@override
|
|
Widget build(BuildContext context) => PropertiesContent(
|
|
key: const Key('properties-tool-panel'),
|
|
projectId: projectId,
|
|
timelineId: timelineId,
|
|
categoryHeaderHeight: 48,
|
|
categoryControls: (context, categories, selected, onSelected) =>
|
|
SingleChildScrollView(
|
|
scrollDirection: Axis.horizontal,
|
|
child: Row(
|
|
children: [
|
|
for (final category in categories)
|
|
TextButton(
|
|
key: ValueKey('property-tab-${category.name}'),
|
|
style: TextButton.styleFrom(
|
|
minimumSize: const Size(64, 48),
|
|
foregroundColor: selected == category
|
|
? Theme.of(context).colorScheme.primary
|
|
: null,
|
|
),
|
|
onPressed: () => onSelected(category),
|
|
child: Text(category.label(context)),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|