{"id":28614270,"url":"https://github.com/openflutter/flutter_ok_image","last_synced_at":"2025-07-01T08:07:22.826Z","repository":{"id":56835831,"uuid":"158632294","full_name":"OpenFlutter/flutter_ok_image","owner":"OpenFlutter","description":"a flutter image widget to load image.","archived":false,"fork":false,"pushed_at":"2019-08-16T05:37:51.000Z","size":101,"stargazers_count":41,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T01:13:45.376Z","etag":null,"topics":["cache","error","flutter","image","load","loading","net","retry"],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenFlutter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-22T02:33:53.000Z","updated_at":"2023-10-16T05:39:12.000Z","dependencies_parsed_at":"2022-09-13T08:42:09.559Z","dependency_job_id":null,"html_url":"https://github.com/OpenFlutter/flutter_ok_image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpenFlutter/flutter_ok_image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_ok_image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_ok_image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_ok_image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_ok_image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenFlutter","download_url":"https://codeload.github.com/OpenFlutter/flutter_ok_image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_ok_image/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262924966,"owners_count":23385459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","error","flutter","image","load","loading","net","retry"],"created_at":"2025-06-12T01:13:36.284Z","updated_at":"2025-07-01T08:07:22.785Z","avatar_url":"https://github.com/OpenFlutter.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OKImage\n\nEasy 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.\n\n[![ok_image](https://img.shields.io/badge/OpenFlutter-OKImage-blue.svg)](https://github.com/OpenFlutter/flutter_ok_image)\n[![pub package](https://img.shields.io/pub/v/ok_image.svg)](https://pub.dartlang.org/packages/ok_image)\n![GitHub](https://img.shields.io/github/license/OpenFlutter/flutter_ok_image.svg)\n[![GitHub stars](https://img.shields.io/github/stars/OpenFlutter/flutter_ok_image.svg?style=social\u0026label=Stars)](https://github.com/OpenFlutter/flutter_ok_image)\n\n## use\n\n1. add to your pubspec.yaml\n\n```yaml\nok_image: ^0.4.0\n```\n\n2. import\n\n```dart\nimport \"package:ok_image/ok_image.dart\";\n```\n\n3. use\n\n```dart\nimport \"package:ok_image/ok_image.dart\";\ncreateWidget(){\n  return OKImage(\n      url: \"https://ws1.sinaimg.cn/large/844036b9ly1fxfo76hzd4j20zk0nc48i.jpg\",\n      width: 200,\n      height: 200,\n      timeout: Duration(seconds: 20),\n      fit: fit,\n    );\n}\n```\n\n4. params\n\n```markdown\nurl: image net url\nwidth: width\nheight: height\nfit: show BoxFit\nfollowRedirects: whether image redirection is allowed.\nloadingWidget: display on loading\nerrorWidget: display when image load error / timeout.\nretry: retry to load image count.\ntimeout: timeout duration.\nonErrorTap: when loadErrorWidget show ,onTap it.\ncacheDelegate: you can use the param to delegate loadImage\n```\n\nExperimental: Signatures, return values, parameters and other information may be modified in the future.\n\n```md\nonLoadStateChanged: will be call on the load state changed.\n```\n\n5. global config\n\nedit `OKImage.buildErrorWidget` to config global OKImage errorWidget.\n\nedit `OKImage.buildLoadingWidget` to config global OKImage loading.\n\n## about other library\n\nunder BSD 3:\n\n1. This library uses [http 0.12.0+2](https://pub.dartlang.org/packages/http) as a framework for network access.\n2. using [path_provider 1.2.0](https://pub.dartlang.org/packages/path_provider) to get default catch path.\n3. using [crypto 2.0.6](https://pub.dartlang.org/packages/crypto) to make and check md5.\n\nApache 2.0:\n\n1. Using [rxdart 0.22.1](https://pub.dartlang.org/packages/rxdart) processing logic\n\nthanks to open source.\n\nIf you are using older versions of these open source libraries, which cause incompatibility, please update your.\nIf it is incompatible with me, please contact me and I will update the version number when appropriate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenflutter%2Fflutter_ok_image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenflutter%2Fflutter_ok_image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenflutter%2Fflutter_ok_image/lists"}