Pakete, Repositories und App-Kategorien suchen

GitHub-Repositorytzvc/responsive_image

responsive_image

tzvc/responsive_image open-source repository details.

Projektcover von responsive_image
Sterne
5
Forks
4
Letzter Push (UTC)
09.11.2019
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

responsive_image

A Flutter library that bring responsive capabilities to images.

Given a set of source URLs, the widget select the approriate source depending on the rendering size of the child widget, the pixel density of the device and a user defined scaling preference.

example staggered tiles

Features

  • Automatic image source selection based on size and device pixel density
  • Adjustable scaling preference
  • Extendability and customization with builder

Example

Basic usage:

ResponsiveImage(
  srcSet: {
    64: "https://via.placeholder.com/64",
    128: "https://via.placeholder.com/128",
    256: "https://via.placeholder.com/256",
    512: "https://via.placeholder.com/512",
  },
  scalePreference: ScalePreference.Upper,
);

Usage with builder for further customization of the displayed image:

ResponsiveImage(
  srcSet: {
    256: "https://via.placeholder.com/256",
    512: "https://via.placeholder.com/512",
    1024: "https://via.placeholder.com/1024",
  },
  builder: (BuildContext context, String url) {
    return CachedNetworkImage(
      imageUrl: url,
      placeholder: (context, url) => CircularProgressIndicator(),
      errorWidget: (context, url, error) => Icon(Icons.error),
    );
  },
);
Théo champion GitHub avatar
GitHub-Autor

Théo champion ↗

send GCP credits

@zigg-app Paris, France
SprachenDartSwiftKotlinObjective-C

Verwendete Abhängigkeiten

Abhängigkeiten 2 Einträge

  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗