HttpImage.string constructor

HttpImage.string(
  1. String url, {
  2. double scale = 1.0,
  3. Map<String, String>? headers,
  4. Client? client,
})

Creates an object that fetches the image at the given URL.

The arguments url and scale must not be null. client will be the default Client if not set.

Implementation

HttpImage.string(String url, {this.scale = 1.0, this.headers, Client? client})
    : client = client ?? defaultClient,
      url = Uri.parse(url);