diff --git a/lib/model/settings/coordinate_format.dart b/lib/model/settings/coordinate_format.dart index 7b968ba88..6bc89007b 100644 --- a/lib/model/settings/coordinate_format.dart +++ b/lib/model/settings/coordinate_format.dart @@ -1,6 +1,5 @@ import 'package:aves/utils/geo_utils.dart'; import 'package:latlong/latlong.dart'; -import 'package:tuple/tuple.dart'; enum CoordinateFormat { dms, decimal } diff --git a/lib/widgets/collection/thumbnail/vector.dart b/lib/widgets/collection/thumbnail/vector.dart index e93ddc8bb..58f71609d 100644 --- a/lib/widgets/collection/thumbnail/vector.dart +++ b/lib/widgets/collection/thumbnail/vector.dart @@ -32,10 +32,10 @@ class ThumbnailVectorImage extends StatelessWidget { UriPicture( uri: entry.uri, mimeType: entry.mimeType, + colorFilter: colorFilter, ), width: extent, height: extent, - colorFilter: colorFilter, ); }, ), diff --git a/lib/widgets/common/image_providers/uri_picture_provider.dart b/lib/widgets/common/image_providers/uri_picture_provider.dart index f2e86ddaa..9165fc3f1 100644 --- a/lib/widgets/common/image_providers/uri_picture_provider.dart +++ b/lib/widgets/common/image_providers/uri_picture_provider.dart @@ -8,10 +8,13 @@ class UriPicture extends PictureProvider { const UriPicture({ @required this.uri, @required this.mimeType, + this.colorFilter, }) : assert(uri != null); final String uri, mimeType; + final ColorFilter colorFilter; + @override Future obtainKey(PictureConfiguration configuration) { return SynchronousFuture(this); @@ -34,22 +37,22 @@ class UriPicture extends PictureProvider { final decoder = SvgPicture.svgByteDecoder; if (onError != null) { - final future = decoder(data, null, key.toString()); + final future = decoder(data, colorFilter, key.toString()); unawaited(future.catchError(onError)); return future; } - return decoder(data, null, key.toString()); + return decoder(data, colorFilter, key.toString()); } @override bool operator ==(Object other) { if (other.runtimeType != runtimeType) return false; - return other is UriPicture && other.uri == uri; + return other is UriPicture && other.uri == uri && other.colorFilter == colorFilter; } @override - int get hashCode => uri.hashCode; + int get hashCode => hashValues(uri, colorFilter); @override - String toString() => '${objectRuntimeType(this, 'UriPicture')}(uri=$uri, mimeType=$mimeType)'; + String toString() => '${objectRuntimeType(this, 'UriPicture')}(uri=$uri, mimeType=$mimeType, colorFilter=$colorFilter)'; } diff --git a/lib/widgets/fullscreen/image_view.dart b/lib/widgets/fullscreen/image_view.dart index 1ac44a6b7..b40fa028a 100644 --- a/lib/widgets/fullscreen/image_view.dart +++ b/lib/widgets/fullscreen/image_view.dart @@ -203,9 +203,9 @@ class _ImageViewState extends State { UriPicture( uri: entry.uri, mimeType: entry.mimeType, + colorFilter: colorFilter, ), placeholderBuilder: (context) => _loadingBuilder(context, fastThumbnailProvider), - colorFilter: colorFilter, ), backgroundDecoration: backgroundDecoration, controller: _photoViewController, diff --git a/pubspec.lock b/pubspec.lock index b505bdcad..b83655a87 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,7 +21,7 @@ packages: name: ansicolor url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.1" archive: dependency: transitive description: @@ -324,7 +324,7 @@ packages: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.5.0" + version: "0.5.1" flutter_native_timezone: dependency: "direct main" description: @@ -535,7 +535,7 @@ packages: name: node_interop url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" node_io: dependency: transitive description: @@ -647,7 +647,7 @@ packages: name: pdf url: "https://pub.dartlang.org" source: hosted - version: "1.11.2" + version: "1.12.0" pedantic: dependency: "direct main" description: