2024-08-09 08:43:47 -05:00
|
|
|
import 'package:flutter/material.dart';
|
2025-03-06 23:28:24 +05:30
|
|
|
import 'package:immich_mobile/domain/models/exif.model.dart';
|
2024-08-09 08:43:47 -05:00
|
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|
|
|
|
|
|
|
|
|
class CameraInfo extends StatelessWidget {
|
|
|
|
|
final ExifInfo exifInfo;
|
|
|
|
|
|
2025-07-29 00:34:03 +05:30
|
|
|
const CameraInfo({super.key, required this.exifInfo});
|
2024-08-09 08:43:47 -05:00
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final textColor = context.isDarkTheme ? Colors.white : Colors.black;
|
|
|
|
|
return ListTile(
|
|
|
|
|
contentPadding: const EdgeInsets.all(0),
|
|
|
|
|
dense: true,
|
2025-07-29 00:34:03 +05:30
|
|
|
leading: Icon(Icons.camera, color: textColor.withAlpha(200)),
|
|
|
|
|
title: Text("${exifInfo.make} ${exifInfo.model}", style: context.textTheme.labelLarge),
|
2025-07-25 08:07:22 +05:30
|
|
|
subtitle: exifInfo.f != null || exifInfo.exposureSeconds != null || exifInfo.mm != null || exifInfo.iso != null
|
2024-08-09 08:43:47 -05:00
|
|
|
? Text(
|
|
|
|
|
"ƒ/${exifInfo.fNumber} ${exifInfo.exposureTime} ${exifInfo.focalLength} mm ISO ${exifInfo.iso ?? ''} ",
|
|
|
|
|
style: context.textTheme.bodySmall,
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|