{"id":32307507,"url":"https://github.com/qq326646683/interactiveviewer_gallery","last_synced_at":"2026-02-24T14:37:29.055Z","repository":{"id":41290212,"uuid":"309330402","full_name":"qq326646683/interactiveviewer_gallery","owner":"qq326646683","description":"Enhancements to interactiveviewer: picture and video preview, support two-finger gesture zoom, double-click to zoom, switch left and right。图片预览，视频预览，图片视频混合预览","archived":false,"fork":false,"pushed_at":"2021-06-19T04:39:58.000Z","size":106,"stargazers_count":61,"open_issues_count":4,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-16T01:27:57.262Z","etag":null,"topics":["finger-gesture-zoom","gesture","interactiveviewer-gallery","video","video-preview"],"latest_commit_sha":null,"homepage":"","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/qq326646683.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":"2020-11-02T10:07:45.000Z","updated_at":"2025-10-26T02:20:10.000Z","dependencies_parsed_at":"2022-09-16T17:41:24.921Z","dependency_job_id":null,"html_url":"https://github.com/qq326646683/interactiveviewer_gallery","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/qq326646683/interactiveviewer_gallery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq326646683%2Finteractiveviewer_gallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq326646683%2Finteractiveviewer_gallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq326646683%2Finteractiveviewer_gallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq326646683%2Finteractiveviewer_gallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qq326646683","download_url":"https://codeload.github.com/qq326646683/interactiveviewer_gallery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq326646683%2Finteractiveviewer_gallery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29785735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["finger-gesture-zoom","gesture","interactiveviewer-gallery","video","video-preview"],"created_at":"2025-10-23T07:19:01.691Z","updated_at":"2026-02-24T14:37:29.050Z","avatar_url":"https://github.com/qq326646683.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# interactiveviewer_gallery\n[![pub package](https://img.shields.io/pub/v/interactiveviewer_gallery.svg)](https://pub.dartlang.org/packages/interactiveviewer_gallery)\n\n[中文文档](./README_CH.md)\n\nA flutter library to show picture and video preview gallery\nsupport\n1. two-finger gesture zoom\n2. double-click to zoom\n3. switch left and right\n4. gesture back: scale, transfer, opacity of background\n5. video auto paused when miss focus\n\n## Preview\n[video for youtube](https://youtu.be/S-93Et_nYQs)\n\n[video for qiniu](http://file.jinxianyun.com/interactiveviewer_gallery_0_1_0.mp4)\n\n[apk download](http://file.jinxianyun.com/interactiveviewer_gallery_0_1_0.apk)\n\n## Setup\n\nbecause the library is base on InteractiveViewer so require flutter verion above or equal 1.20.0\n```dart\ninteractiveviewer_gallery: ${last_version}\n```\n\n## How to use\n\n1. Wrap Hero in your image gridview item:\n```dart\nHero(\n    tag: source.url,\n    child: ${gridview item}\n)\n ```\n\n2. gridview item's GestureDetector add jumping to interactiveviewer_gallery:\n```dart\n// DemoSourceEntity is your data model\n// itemBuilder is gallery page item\nvoid _openGallery(DemoSourceEntity source) {\n  Navigator.of(context).push(\n    HeroDialogRoute\u003cvoid\u003e(\n      // DisplayGesture is just debug, please remove it when use\n      builder: (BuildContext context) =\u003e InteractiveviewerGallery\u003cDemoSourceEntity\u003e(\n          sources: sourceList,\n          initIndex: sourceList.indexOf(source),\n          itemBuilder: itemBuilder,\n          onPageChanged: (int pageIndex) {\n            print(\"nell-pageIndex:$pageIndex\");\n          },\n      ),\n    ),\n  );\n}\n```\n\n3. edit itemBuilder: you can reference the [example/lib/main.dart](https://github.com/qq326646683/interactiveviewer_gallery/blob/main/example/lib/main.dart) then customize\n\n```dart\nWidget itemBuilder(BuildContext context, int index, bool isFocus) {\n  DemoSourceEntity sourceEntity = sourceList[index];\n  if (sourceEntity.type == 'video') {\n    return DemoVideoItem(\n      sourceEntity,\n      isFocus: isFocus,\n    );\n  } else {\n    return DemoImageItem(sourceEntity);\n  }\n}\n```\n\n## Other\nComments and pr are welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq326646683%2Finteractiveviewer_gallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqq326646683%2Finteractiveviewer_gallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq326646683%2Finteractiveviewer_gallery/lists"}