Make GravatarImageProvider work again
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
144f55af6d
commit
339d358203
|
@ -1 +1,2 @@
|
|||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.enableR8=true
|
||||
|
|
|
@ -1,9 +1,45 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter/painting.dart';
|
||||
import 'package:crypto/crypto.dart';
|
||||
|
||||
class GravatarImageProvider extends NetworkImage {
|
||||
GravatarImageProvider(String email)
|
||||
: super("https://secure.gravatar.com/avatar/" +
|
||||
md5.convert(email.trim().toLowerCase().codeUnits).toString());
|
||||
class GravatarImageProvider implements NetworkImage {
|
||||
|
||||
String _email;
|
||||
|
||||
GravatarImageProvider(this._email);
|
||||
|
||||
@override
|
||||
String get url {
|
||||
return "https://secure.gravatar.com/avatar/" +
|
||||
md5.convert(_email.trim().toLowerCase().codeUnits).toString();
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, String> get headers {
|
||||
// We don't need special headers for our request, so we can just return null here
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
ImageStreamCompleter load(NetworkImage key, DecoderCallback decode) {
|
||||
return load(key, decode);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<NetworkImage> obtainKey(ImageConfiguration configuration) {
|
||||
return obtainKey(configuration);
|
||||
}
|
||||
|
||||
@override
|
||||
// Returning null here will set this to 1.0
|
||||
double get scale => null;
|
||||
|
||||
@override
|
||||
Future<bool> evict({ImageCache cache, ImageConfiguration configuration = ImageConfiguration.empty}) {
|
||||
return evict(cache: cache,configuration: configuration);
|
||||
}
|
||||
|
||||
@override
|
||||
ImageStream resolve(ImageConfiguration configuration) {
|
||||
return resolve(configuration);
|
||||
}
|
||||
}
|
||||
|
|
38
pubspec.lock
38
pubspec.lock
|
@ -1,5 +1,5 @@
|
|||
# Generated by pub
|
||||
# See https://www.dartlang.org/tools/pub/glossary#lockfile
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
after_layout:
|
||||
dependency: "direct main"
|
||||
|
@ -14,28 +14,28 @@ packages:
|
|||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.8"
|
||||
version: "2.0.11"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
version: "1.5.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.8"
|
||||
version: "2.4.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -63,7 +63,7 @@ packages:
|
|||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.6"
|
||||
version: "2.1.3"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -124,49 +124,49 @@ packages:
|
|||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
version: "2.1.4"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.3+1"
|
||||
version: "0.12.6"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
version: "1.1.8"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.2"
|
||||
version: "1.6.4"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.8.0+1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.4.0"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: quiver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
version: "2.0.5"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
@ -178,7 +178,7 @@ packages:
|
|||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.4"
|
||||
version: "1.5.5"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -192,14 +192,14 @@ packages:
|
|||
name: stream_channel
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.8"
|
||||
version: "2.0.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -213,7 +213,7 @@ packages:
|
|||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.2"
|
||||
version: "0.2.11"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -234,7 +234,7 @@ packages:
|
|||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.3.1"
|
||||
version: "3.5.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -243,4 +243,4 @@ packages:
|
|||
source: hosted
|
||||
version: "2.1.15"
|
||||
sdks:
|
||||
dart: ">=2.1.0 <3.0.0"
|
||||
dart: ">=2.4.0 <3.0.0"
|
||||
|
|
|
@ -4,7 +4,7 @@ description: Vikunja as Flutter cross platform app
|
|||
version: 0.1.0
|
||||
|
||||
environment:
|
||||
sdk: ">=2.0.0-dev.63.0 <3.0.0"
|
||||
sdk: ">=2.1.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
|
Reference in New Issue