Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Commit

Permalink
Set the type of the callback passed to AddLIstener
Browse files Browse the repository at this point in the history
Fix for issue efortuna#38
efortuna#38
  • Loading branch information
chonghorizons authored Apr 9, 2020
1 parent 13b386e commit 1e5225d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,18 @@ class ChatScreenState extends State<ChatScreen> with TickerProviderStateMixin {
});
if (imageUrl != null) {
NetworkImage image = NetworkImage(imageUrl);
image
.resolve(createLocalImageConfiguration(context))
.addListener((_, __) {
ImageStreamListener isl = ImageStreamListener((_, __) {
animationController?.forward();
});
image
.resolve(createLocalImageConfiguration(context))
.addListener(isl);
// OLD CODE WITH typeCheck error "Null(dynamic, dynamic)
// image
// .resolve(createLocalImageConfiguration(context))
// .addListener((_, __) {
// animationController?.forward();
// });
} else {
animationController?.forward();
}
Expand Down

0 comments on commit 1e5225d

Please sign in to comment.