Flutter_cached_network_image: Images are loaded but the placeholder still showing

Created on 22 Jun 2019  ·  4Comments  ·  Source: Baseflow/flutter_cached_network_image

thanks for this great package! this is a snippet of my code
CachedNetworkImage( fit: BoxFit.cover, height: 200, width: MediaQuery.of(context).size.width, color: Colors.white, imageUrl: "https://www.example.com/api/services_img/${data[index]['photo']}", placeholder: (context, url) => CircularProgressIndicator(), errorWidget: (context, url, error) => new Icon(Icons.error), ),

Most helpful comment

Had the same problem. Reinstalled the app and now it works. 🤷‍♂

All 4 comments

Had the same problem. Reinstalled the app and now it works. 🤷‍♂

Had the same problem when I upgrade flutter sdk to the lastest version v1.7.9

Maybe this is a problem with flutter_cache_manager which use sqflight

V/DartMessenger(20514): Received message from Dart over channel 'com.tekartik.sqflite'
V/DartMessenger(20514): Deferring to registered handler to process message.
E/AndroidRuntime(20514): FATAL EXCEPTION: Sqflite
E/AndroidRuntime(20514): Process: com.example.fanli.host, PID: 20514
E/AndroidRuntime(20514): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Sqflite
E/AndroidRuntime(20514):    at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:794)
E/AndroidRuntime(20514):    at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:727)
E/AndroidRuntime(20514):    at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:140)
E/AndroidRuntime(20514):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
E/AndroidRuntime(20514):    at com.tekartik.sqflite.SqflitePlugin$6.run(SqflitePlugin.java:778)
E/AndroidRuntime(20514):    at android.os.Handler.handleCallback(Handler.java:743)
E/AndroidRuntime(20514):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(20514):    at android.os.Looper.loop(Looper.java:150)
E/AndroidRuntime(20514):    at android.os.HandlerThread.run(HandlerThread.java:61)

@yossefEl this is a problem with sqflite used in 'flutter_cache_manager', and has resolved in v1.1.6+1. You can redo 'Packages get' to resolved this problem

@loumzy @itsJoKr Thanks a ot i just hot restarted the app and it works perfectly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anass-naoushi picture anass-naoushi  ·  5Comments

tolotrasamuel picture tolotrasamuel  ·  6Comments

qq3144225600 picture qq3144225600  ·  5Comments

sososdk picture sososdk  ·  5Comments

srburton picture srburton  ·  6Comments