| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -5,32 +5,28 @@ final _cacheManager = DefaultCacheManager(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class CachedURLImage extends StatelessWidget { | 
					 | 
					 | 
					 | 
					class CachedURLImage extends StatelessWidget { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const CachedURLImage({ | 
					 | 
					 | 
					 | 
					  const CachedURLImage({ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    required this.url, | 
					 | 
					 | 
					 | 
					    required this.url, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    required this.account, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this.height, | 
					 | 
					 | 
					 | 
					    this.height, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this.width, | 
					 | 
					 | 
					 | 
					    this.width, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this.fit, | 
					 | 
					 | 
					 | 
					    this.fit, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    this.color, | 
					 | 
					 | 
					 | 
					    this.svgColor, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    this.iconColor, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    super.key, | 
					 | 
					 | 
					 | 
					    super.key, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  }); | 
					 | 
					 | 
					 | 
					  }); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final String url; | 
					 | 
					 | 
					 | 
					  final String url; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final Account account; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final double? height; | 
					 | 
					 | 
					 | 
					  final double? height; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final double? width; | 
					 | 
					 | 
					 | 
					  final double? width; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final BoxFit? fit; | 
					 | 
					 | 
					 | 
					  final BoxFit? fit; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  /// Only works for SVGs | 
					 | 
					 | 
					 | 
					  final Color? svgColor; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final Color? color; | 
					 | 
					 | 
					 | 
					  final Color? iconColor; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  @override | 
					 | 
					 | 
					 | 
					  @override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  Widget build(final BuildContext context) => FutureBuilder<File>( | 
					 | 
					 | 
					 | 
					  Widget build(final BuildContext context) => FutureBuilder<File>( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // Really weird false positive | 
					 | 
					 | 
					 | 
					        // Really weird false positive | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // ignore: discarded_futures | 
					 | 
					 | 
					 | 
					        // ignore: discarded_futures | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        future: _cacheManager.getSingleFile( | 
					 | 
					 | 
					 | 
					        future: _cacheManager.getSingleFile(url), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          url, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          headers: account.client.baseHeaders, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        ), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        builder: (final context, final fileSnapshot) { | 
					 | 
					 | 
					 | 
					        builder: (final context, final fileSnapshot) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          if (fileSnapshot.hasData) { | 
					 | 
					 | 
					 | 
					          if (fileSnapshot.hasData) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            final content = fileSnapshot.data!.readAsBytesSync(); | 
					 | 
					 | 
					 | 
					            final content = fileSnapshot.data!.readAsBytesSync(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -56,7 +52,7 @@ class CachedURLImage extends StatelessWidget { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                height: height, | 
					 | 
					 | 
					 | 
					                height: height, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                width: width, | 
					 | 
					 | 
					 | 
					                width: width, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                fit: fit ?? BoxFit.contain, | 
					 | 
					 | 
					 | 
					                fit: fit ?? BoxFit.contain, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                color: color, | 
					 | 
					 | 
					 | 
					                color: svgColor, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              ); | 
					 | 
					 | 
					 | 
					              ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -65,17 +61,21 @@ class CachedURLImage extends StatelessWidget { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              height: height, | 
					 | 
					 | 
					 | 
					              height: height, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              width: width, | 
					 | 
					 | 
					 | 
					              width: width, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              fit: fit, | 
					 | 
					 | 
					 | 
					              fit: fit, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					              gaplessPlayback: true, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ); | 
					 | 
					 | 
					 | 
					            ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          } | 
					 | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          if (fileSnapshot.hasError) { | 
					 | 
					 | 
					 | 
					          if (fileSnapshot.hasError) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return Icon( | 
					 | 
					 | 
					 | 
					            return Icon( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              Icons.error_outline, | 
					 | 
					 | 
					 | 
					              Icons.error_outline, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              size: height != null && width != null ? min(height!, width!) : height ?? width, | 
					 | 
					 | 
					 | 
					              size: height != null && width != null ? min(height!, width!) : height ?? width, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					              color: iconColor, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ); | 
					 | 
					 | 
					 | 
					            ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          } | 
					 | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          return SizedBox( | 
					 | 
					 | 
					 | 
					          return SizedBox( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            width: width, | 
					 | 
					 | 
					 | 
					            width: width, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            child: const CustomLinearProgressIndicator(), | 
					 | 
					 | 
					 | 
					            child: CustomLinearProgressIndicator( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					              color: iconColor, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          ); | 
					 | 
					 | 
					 | 
					          ); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }, | 
					 | 
					 | 
					 | 
					        }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      ); | 
					 | 
					 | 
					 | 
					      ); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |