Closed MrErkinjon closed 9 months ago
environment: sdk: '>=2.19.6 <4.0.0' dependencies: easy_image_viewer: ^1.2.1
@MrErkinjon Hi, thanks for reporting. I can't repro it. I put your (slightly modified) code into the example app and it worked without problems.
Please provide a sample project and the output of flutter doctor
. Thank you.
Hey guys!
I rushed over the same problem here. I also get the same error. I guess you are using Flutter 3.7.0 or lower.
The Problem here is, that Columns are not const for Flutter 3.7 and lower. I just tried it out with a project where I have the a newer Version (3.13.9). So I just looked up and found that columns are const since 3.10
To solve your problem, downgrade to easy_image_viewer: 1.3.2
@DerJojo11 Another Johannes :) Thanks so much for the feedback, that's very helpful. I'll work on a fix.
Fixed in 1.4.1, closing this ticket.
Describe the Issue
../../../.pub-cache/hosted/pub.dev/easy_image_viewer-1.4.0/lib/src/easy_image_provider.dart:85:14: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. child: Column( ^^^^^^
Todo
InkWell( onTap: () { showImageViewer( context, (workItem.image != "") ? Image.network( "${BASE_URL_WORK_IMAGE}${workItem.image}") .image : Image.network( "https://t3.ftcdn.net/jpg/04/34/72/82/360_F_434728286_OWQQvAFoXZLdGHlObozsolNeuSxhpr84.jpg") .image, swipeDismissible: true, doubleTapZoomable: true, useSafeArea: true, immersive: false); }, child:Icon(Icons.add) );