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.
74 lines
2.2 KiB
Dart
74 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:cutdex_ui/theme.dart';
|
|
|
|
class SettingsPageSection extends StatelessWidget {
|
|
const SettingsPageSection({
|
|
super.key,
|
|
required this.title,
|
|
required this.icon,
|
|
required this.children,
|
|
this.action,
|
|
});
|
|
|
|
final String title;
|
|
final IconData icon;
|
|
final List<Widget> children;
|
|
final Widget? action;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Theme.of(context);
|
|
return Align(
|
|
alignment: Alignment.topCenter,
|
|
child: ConstrainedBox(
|
|
constraints: const BoxConstraints(
|
|
maxWidth: AppSettingsMetrics.contentWidth,
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Text(title, style: theme.textTheme.titleLarge),
|
|
const SizedBox(height: 40),
|
|
Row(
|
|
children: [
|
|
Expanded(child: Text(title, style: theme.textTheme.labelLarge)),
|
|
?action,
|
|
],
|
|
),
|
|
const SizedBox(height: AppSpacing.medium),
|
|
DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
color: theme.colorScheme.surfaceContainer,
|
|
borderRadius: BorderRadius.circular(
|
|
AppSettingsMetrics.cardRadius,
|
|
),
|
|
border: Border.all(color: theme.colorScheme.outlineVariant),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: AppSpacing.medium,
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
for (var index = 0; index < children.length; index++) ...[
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: AppSettingsMetrics.rowVerticalPadding,
|
|
),
|
|
child: children[index],
|
|
),
|
|
if (index < children.length - 1) const Divider(height: 1),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|