ok_image 0.0.1 copy "ok_image: ^0.0.1" to clipboard
ok_image: ^0.0.1 copied to clipboard

discontinuedreplaced by: extended_image
outdated

A new Flutter package project.

OKImage #

You can easily use this library to build a network load gallery, you can build different layouts according to the error/load, you can also set up the image cache delegation.

use #

  1. add to your pubspec.yaml
ok_image: ^0.0.1
  1. import
import "package:ok_image/ok_image.dart";
  1. use
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,
    );
}
  1. params
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 loadImage
5
likes
0
pub points
12%
popularity

Publisher

unverified uploader

A new Flutter package project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, http, rxdart

More

Packages that depend on ok_image