mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			415 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			415 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'dart:io' show Platform;
 | 
						|
import 'package:package_info_plus/package_info_plus.dart';
 | 
						|
 | 
						|
Future<String> getUserAgentString() async {
 | 
						|
  final packageInfo = await PackageInfo.fromPlatform();
 | 
						|
  String platform;
 | 
						|
  if (Platform.isAndroid) {
 | 
						|
    platform = 'Android';
 | 
						|
  } else if (Platform.isIOS) {
 | 
						|
    platform = 'iOS';
 | 
						|
  } else {
 | 
						|
    platform = 'Unknown';
 | 
						|
  }
 | 
						|
  return 'Immich_${platform}_${packageInfo.version}';
 | 
						|
}
 |