ok_image 0.0.3

  • README.md
  • Example
  • Installing
  • Versions
  • new53


Easy to use this library to build a network image widget, you can build different layouts according to the error/load, also set up the image cache delegate.


  1. add to your pubspec.yaml
ok_image: ^0.0.3
  1. import
import "package:ok_image/ok_image.dart";
  1. use
import "package:ok_image/ok_image.dart";
  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

about other library

This library uses http as a framework for network access.
Using rxdart processing logic

thanks to open source.


[0.0.3] add cache delegate

add a default cache delegate to cache image


use MIT

[0.0.1] first version



A new Flutter project.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  ok_image: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:ok_image/ok_image.dart';
Version Uploaded Documentation Archive
0.0.3 Nov 27, 2018 Go to the documentation of ok_image 0.0.3 Download ok_image 0.0.3 archive
0.0.2 Nov 22, 2018 Go to the documentation of ok_image 0.0.2 Download ok_image 0.0.2 archive
0.0.1 Nov 22, 2018 Go to the documentation of ok_image 0.0.1 Download ok_image 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
crypto ^2.0.6 2.0.6
flutter 0.0.0
http ^0.12.0 0.12.0
path_provider ^0.4.1 0.4.1
rxdart ^0.19.0 0.19.0
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.0.2
http_parser 3.1.3
meta 1.1.6
path 1.6.2
sky_engine 0.0.99
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies