Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance zoom #859

Merged
merged 13 commits into from
Jan 11, 2024
Prev Previous commit
Next Next commit
fix: now retrieving dimentions after initstate
  • Loading branch information
Niranjan-Dorage committed Dec 30, 2023
commit f463061da84185d6c85f4e231864b14aa2934e34
5 changes: 3 additions & 2 deletions lib/shared/image_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
}

Future<void> getImageSize(String imageUrl, context) async {
retrieveImageDimensions(imageUrl);
Size decodedImage = await retrieveImageDimensions(imageUrl);

setState(() {
Niranjan-Dorage marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -127,7 +126,9 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
@override
void initState() {
super.initState();
getImageSize(widget.url!, context);
WidgetsBinding.instance.addPostFrameCallback((_) {
getImageSize(widget.url!, context);
});
}

@override
Expand Down