Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

How can i hide the CachedNetworkImage if there is an image issue.

オープン
#992 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
dart, flutter
領域
mobile

調査の方向性

この issue には CachedNetworkImage のインライン例が含まれています。まず、その errorWidget コールバックと、周囲のリスト項目のレイアウトを確認してください。固定高さの空のボックスを残さず、404 の後にリスト項目がどのように動作するかを判断できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Dart
スター
2.6k
フォーク
731
平均マージ
4日 12時間
マージ済み PR(30日)
2

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Baseflow/flutter_cached_network_image のほかの issue

Baseflow/flutter_cached_network_image の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。