flutter_ok_image
1.0.0
Fácil de usar esta biblioteca para construir un widget de imagen de red, puede construir diferentes diseños de acuerdo con el error/carga, también configure el delegado de caché de la imagen.
ok_image : ^0.4.0 import "package:ok_image/ok_image.dart" ; import "package:ok_image/ok_image.dart" ;
createWidget (){
return OKImage (
url : "https://ws1.sinaimg.cn/large/844036b9ly1fxfo76hzd4j20zk0nc48i.jpg" ,
width : 200 ,
height : 200 ,
timeout : Duration (seconds : 20 ),
fit : fit,
);
}url: image net url
width: width
height: height
fit: show BoxFit
followRedirects: whether image redirection is allowed.
loadingWidget: display on loading
errorWidget: display when image load error / timeout.
retry: retry to load image count.
timeout: timeout duration.
onErrorTap: when loadErrorWidget show ,onTap it.
cacheDelegate: you can use the param to delegate loadImageExperimental: las firmas, valores de retorno, parámetros y otra información pueden modificarse en el futuro.
onLoadStateChanged: will be call on the load state changed. Editar OKImage.buildErrorWidget para configurar global Okimage ErrorWidget.
Editar OKImage.buildLoadingWidget para configurar la carga global de okimage.
bajo BSD 3:
Apache 2.0:
Gracias al código abierto.
Si está utilizando versiones anteriores de estas bibliotecas de código abierto, que causan incompatibilidad, actualice su. Si es incompatible conmigo, contácteme y actualizaré el número de versión cuando sea apropiado.