How to install and use cached_network_image with Flutter 3.7.0

A popular Flutter package with 4251 likes that support Flutter version 3.7.0 and above. Last version of the package was published on Jan 31, 2023.

Installing cached_network_image

You can either add the package directly using the flutter command line.

$ flutter pub add cached_network_image

Or add the dependency directly to your pubspec.yaml file.
dependencies:
  cached_network_image: ^3.2.3

In either case, make sure to refresh your packages by running the following command:

$ flutter pub get

Using cached_network_image

Once you have installed the package, you can use it in your Flutter application by importing it.
import 'package:cached_network_image/cached_network_image.dart';