mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 11:56:46 +01:00
d346985457
* date time component * rename to info_sheet * simplify map info * Edit datetime sheet * fix janking when scroll on info sheet * Location refactor * refactor name * Update date time after editing * localize rebuild to smaller component * restore advanced bottom sheet * reassign EXIF back to local database * remove print statements
44 lines
1.5 KiB
Dart
44 lines
1.5 KiB
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|
import 'package:immich_mobile/providers/asset.provider.dart';
|
|
import 'package:immich_mobile/widgets/asset_viewer/detail_panel/file_info.dart';
|
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
|
import 'package:immich_mobile/widgets/asset_viewer/detail_panel/camera_info.dart';
|
|
|
|
class AssetDetails extends ConsumerWidget {
|
|
final Asset asset;
|
|
final ExifInfo? exifInfo;
|
|
|
|
const AssetDetails({
|
|
super.key,
|
|
required this.asset,
|
|
this.exifInfo,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final assetWithExif = ref.watch(assetDetailProvider(asset));
|
|
final ExifInfo? exifInfo = (assetWithExif.value ?? asset).exifInfo;
|
|
|
|
return Padding(
|
|
padding: const EdgeInsets.only(top: 24.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
"exif_bottom_sheet_details",
|
|
style: context.textTheme.labelMedium?.copyWith(
|
|
color: context.textTheme.labelMedium?.color?.withAlpha(200),
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
).tr(),
|
|
FileInfo(asset: asset),
|
|
if (exifInfo?.make != null) CameraInfo(exifInfo: exifInfo!),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|