mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	* update dependencies * update flutter version reference * update flutter version reference * update AndroidManifest with flutter_web_auth_2 * chore: lock file flutter version * fix: ios build
		
			
				
	
	
		
			25 lines
		
	
	
		
			595 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			595 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:flutter/material.dart';
 | 
						|
 | 
						|
extension ImmichColorSchemeExtensions on ColorScheme {
 | 
						|
  bool get _isDarkMode => brightness == Brightness.dark;
 | 
						|
  Color get onSurfaceSecondary => _isDarkMode
 | 
						|
      ? onSurface.darken(amount: .3)
 | 
						|
      : onSurface.lighten(amount: .3);
 | 
						|
}
 | 
						|
 | 
						|
extension ColorExtensions on Color {
 | 
						|
  Color lighten({double amount = 0.1}) {
 | 
						|
    return Color.alphaBlend(
 | 
						|
      Colors.white.withValues(alpha: amount),
 | 
						|
      this,
 | 
						|
    );
 | 
						|
  }
 | 
						|
 | 
						|
  Color darken({double amount = 0.1}) {
 | 
						|
    return Color.alphaBlend(
 | 
						|
      Colors.black.withValues(alpha: amount),
 | 
						|
      this,
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 |