responsive_image
tzvc/responsive_image open-source repository details.
- Estrelas
- 5
- Forks
- 4
- Último push (UTC)
- 9 de nov. de 2019
- Status do projeto
- Ativo
README original
Texto original em inglês. Visite o GitHub para a versão atual.
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.
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),
);
},
);
LinguagensDartSwiftKotlinObjective-C
Dependências usadas
Lista de dependências 2 itens
- flutter
{"sdk":"flutter"} - flutter_testDesenvolvimento
{"sdk":"flutter"}
Como escolher um repositório para seu projeto?
Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.
- Busque por nome, autor ou descrição e filtre por tema.
- Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
- Confira o README, a licença e as issues no GitHub antes de usar o projeto.
Fontes e manutenção
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
