Source Code added
This commit is contained in:
parent
800376eafd
commit
9efa9bc6dd
3912 changed files with 754770 additions and 2 deletions
19
mobile/lib/widgets/asset_viewer/formatted_duration.dart
Normal file
19
mobile/lib/widgets/asset_viewer/formatted_duration.dart
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/extensions/duration_extensions.dart';
|
||||
|
||||
class FormattedDuration extends StatelessWidget {
|
||||
final Duration data;
|
||||
const FormattedDuration(this.data, {super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: data.inHours > 0 ? 70 : 60, // use a fixed width to prevent jitter
|
||||
child: Text(
|
||||
data.format(),
|
||||
style: const TextStyle(fontSize: 14.0, color: Colors.white, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue