152 lines
4.2 KiB
Dart
152 lines
4.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_lucide/flutter_lucide.dart';
|
|
import '../../core/theme/app_colors.dart';
|
|
import '../../core/theme/app_spacing.dart';
|
|
import '../../core/theme/app_typography.dart';
|
|
import '../../shared/widgets/top_nav_bar.dart';
|
|
|
|
/// Video Generation Result screen - matches Pencil cFA4T
|
|
class GenerationResultScreen extends StatelessWidget {
|
|
const GenerationResultScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.background,
|
|
appBar: PreferredSize(
|
|
preferredSize: const Size.fromHeight(56),
|
|
child: TopNavBar(
|
|
title: 'Video Ready',
|
|
showBackButton: true,
|
|
onBack: () => Navigator.of(context).pop(),
|
|
),
|
|
),
|
|
body: SingleChildScrollView(
|
|
padding: const EdgeInsets.all(AppSpacing.screenPaddingLarge),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
_VideoDisplay(),
|
|
const SizedBox(height: AppSpacing.xxl),
|
|
_DownloadButton(onDownload: () {}),
|
|
const SizedBox(height: AppSpacing.lg),
|
|
_ShareButton(onShare: () {}),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _VideoDisplay extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 360,
|
|
decoration: BoxDecoration(
|
|
color: AppColors.textPrimary,
|
|
borderRadius: BorderRadius.circular(16),
|
|
border: Border.all(color: AppColors.border, width: 1),
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(
|
|
LucideIcons.play,
|
|
size: 72,
|
|
color: AppColors.surface.withValues(alpha: 0.5),
|
|
),
|
|
const SizedBox(height: AppSpacing.lg),
|
|
Text(
|
|
'Your video is ready',
|
|
style: AppTypography.bodyRegular.copyWith(
|
|
color: AppColors.surface.withValues(alpha: 0.6),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _DownloadButton extends StatelessWidget {
|
|
const _DownloadButton({required this.onDownload});
|
|
|
|
final VoidCallback onDownload;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onDownload,
|
|
child: Container(
|
|
height: 52,
|
|
decoration: BoxDecoration(
|
|
color: AppColors.primary,
|
|
borderRadius: BorderRadius.circular(14),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: AppColors.primaryShadow.withValues(alpha: 0.25),
|
|
blurRadius: 6,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
],
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(LucideIcons.download, size: 20, color: AppColors.surface),
|
|
const SizedBox(width: AppSpacing.md),
|
|
Text(
|
|
'Download',
|
|
style: AppTypography.bodyMedium.copyWith(
|
|
color: AppColors.surface,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _ShareButton extends StatelessWidget {
|
|
const _ShareButton({required this.onShare});
|
|
|
|
final VoidCallback onShare;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onShare,
|
|
child: Container(
|
|
height: 52,
|
|
decoration: BoxDecoration(
|
|
color: AppColors.surface,
|
|
borderRadius: BorderRadius.circular(14),
|
|
border: Border.all(color: AppColors.border),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: AppColors.shadowLight,
|
|
blurRadius: 6,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
],
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Icon(LucideIcons.share_2, size: 20, color: AppColors.primary),
|
|
const SizedBox(width: AppSpacing.md),
|
|
Text(
|
|
'Share',
|
|
style: AppTypography.bodyMedium.copyWith(
|
|
color: AppColors.textPrimary,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|