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.
54 lines
1.5 KiB
Dart
54 lines
1.5 KiB
Dart
import 'package:cutdex_sdk/project.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'media_asset_cover.dart';
|
|
|
|
import 'package:cutdex_ui/theme.dart';
|
|
|
|
class VisualAssetTile extends StatelessWidget {
|
|
const VisualAssetTile({super.key, required this.asset, this.showName = true});
|
|
final AssetDocument asset;
|
|
final bool showName;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
AspectRatio(
|
|
key: ValueKey('visual-cover-${asset.id}'),
|
|
aspectRatio: 16 / 9,
|
|
child: ColoredBox(
|
|
color: AppSurfaces.of(context).previewBackground,
|
|
child: MediaAssetCover(
|
|
asset: asset,
|
|
fallback: Center(
|
|
child: Icon(
|
|
asset.metadata['kind'] == 'image'
|
|
? Icons.image_outlined
|
|
: Icons.movie_outlined,
|
|
size: AppIconSize.emptyState,
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
if (showName) ...[
|
|
const SizedBox(height: AppSpacing.small),
|
|
Tooltip(
|
|
message: asset.name,
|
|
child: Text(
|
|
asset.name,
|
|
key: ValueKey('visual-name-${asset.id}'),
|
|
maxLines: 1,
|
|
overflow: TextOverflow.ellipsis,
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
),
|
|
),
|
|
],
|
|
],
|
|
);
|
|
}
|
|
}
|