packages upgrade, reverted svg colorFilter move (undeprecated in flutter_svg 0.19.2)

This commit is contained in:
Thibault Deckers 2020-11-24 16:41:27 +09:00
parent 78f5abc39c
commit 893e3b5fa0
5 changed files with 14 additions and 12 deletions

View file

@ -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 }

View file

@ -32,10 +32,10 @@ class ThumbnailVectorImage extends StatelessWidget {
UriPicture(
uri: entry.uri,
mimeType: entry.mimeType,
colorFilter: colorFilter,
),
width: extent,
height: extent,
colorFilter: colorFilter,
);
},
),

View file

@ -8,10 +8,13 @@ class UriPicture extends PictureProvider<UriPicture> {
const UriPicture({
@required this.uri,
@required this.mimeType,
this.colorFilter,
}) : assert(uri != null);
final String uri, mimeType;
final ColorFilter colorFilter;
@override
Future<UriPicture> obtainKey(PictureConfiguration configuration) {
return SynchronousFuture<UriPicture>(this);
@ -34,22 +37,22 @@ class UriPicture extends PictureProvider<UriPicture> {
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)';
}

View file

@ -203,9 +203,9 @@ class _ImageViewState extends State<ImageView> {
UriPicture(
uri: entry.uri,
mimeType: entry.mimeType,
colorFilter: colorFilter,
),
placeholderBuilder: (context) => _loadingBuilder(context, fastThumbnailProvider),
colorFilter: colorFilter,
),
backgroundDecoration: backgroundDecoration,
controller: _photoViewController,

View file

@ -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: