Created
March 2, 2022 18:16
-
-
Save ali2236/763c659c4188765d6345f38d9c3363f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<Size> resolveSize(ImageProvider image) async { | |
final completer = Completer<Size>(); | |
resolve(image, (info, _) { | |
final size = Size( | |
info.image.width.toDouble(), | |
info.image.height.toDouble(), | |
); | |
completer.complete(size); | |
}); | |
return completer.future; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment