mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
		
			
				
	
	
		
			20 lines
		
	
	
		
			585 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			585 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
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,
 | 
						|
      ),
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 |