Baseflow / Baseflow/flutter_cached_network_image
How can i hide the CachedNetworkImage if there is an image issue.
- Lingua principale
- Dart
- Stelle
- 2.6k
- Fork
- 731
- Merge medio
- 3g 9h
- PR unite (30g)
- 1
Descrizione
Hi, Your package is working great.
I just have a one question.
I'm showing the big images in the list view. I need help and suggestions.
Basically there are some urls in the listview which have no images like they throw 404 error. And I'm handling these errors and showing the default images at the place of 404 images.
But now I want to hide the whole CachedNetworkImage on error instead of showing a place holder image.
Here is my code
`CachedNetworkImage(
width: double.maxFinite,
fit: BoxFit.fill,
height: 200,
imageUrl: widget.model?.getPictureUrl ?? "",
progressIndicatorBuilder: (context, url, downloadProgress) => Container(
color: Colors.white,
child: Center(
child: Padding(
padding: const EdgeInsets.all(4.0),
child: CircularProgressIndicator(value: downloadProgress.progress),
))),
errorWidget: (context, url, error) => SizedBox.shrink())`
Currently is showing an empty box but the box height is 200 so its looks bad.
So my main concern is i need to hide full CachedNetworkImage in the listview with best approach.
Can anyone please guide and help me.
Thanks
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
L’issue fornisce un esempio inline di CachedNetworkImage; inizia esaminando il suo callback errorWidget e il layout circostante dell’elemento della lista. Il lavoro è completato quando viene determinato come si comporta l’elemento della lista dopo un 404 senza lasciare il riquadro vuoto di altezza fissa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- dart, flutter
- Ambito
- mobile
- Tipo di issue
- Funzionalità
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100