{"id":13790075,"url":"https://github.com/flutterchina/nine_grid_view","last_synced_at":"2025-05-12T07:31:26.879Z","repository":{"id":38147413,"uuid":"272412414","full_name":"flutterchina/nine_grid_view","owner":"flutterchina","description":"Flutter NineGridView \u0026 DragSortView. Similar to Weibo / WeChat nine grid view controls to display pictures. Flutter仿微信/微博九宫格、拖拽排序，微信群组，钉钉群组，QQ讨论组头像。","archived":false,"fork":false,"pushed_at":"2022-06-10T03:17:15.000Z","size":4212,"stargazers_count":333,"open_issues_count":11,"forks_count":55,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-18T04:35:39.065Z","etag":null,"topics":["dragsortview","flutter","flutter-ui","ninegridview","wechat","weibo"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flutterchina.png","metadata":{"files":{"readme":"README-ZH.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-06-15T10:46:16.000Z","updated_at":"2024-11-13T06:44:38.000Z","dependencies_parsed_at":"2022-09-13T08:42:11.430Z","dependency_job_id":null,"html_url":"https://github.com/flutterchina/nine_grid_view","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutterchina%2Fnine_grid_view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutterchina%2Fnine_grid_view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutterchina%2Fnine_grid_view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutterchina%2Fnine_grid_view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flutterchina","download_url":"https://codeload.github.com/flutterchina/nine_grid_view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253695130,"owners_count":21948818,"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":["dragsortview","flutter","flutter-ui","ninegridview","wechat","weibo"],"created_at":"2024-08-03T22:00:36.664Z","updated_at":"2025-05-12T07:31:24.630Z","avatar_url":"https://github.com/flutterchina.png","language":"Dart","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"Language: [English](https://github.com/flutterchina/nine_grid_view) | 中文简体\n\n[![Pub](https://img.shields.io/pub/v/nine_grid_view.svg?style=flat-square\u0026color=009688)](https://pub.dartlang.org/packages/nine_grid_view)\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[![Pub](https://img.shields.io/pub/v/nine_grid_view.svg?style=flat-square\u0026color=2196F3)](https://pub.flutter-io.cn/packages/nine_grid_view)\n\n### NineGridView\n类似微博动态，微信朋友圈，展示图片的九宫格控件。支持单张大图预览。  \n同时也支持微信群组，钉钉群组，QQ讨论组头像效果。\n\n### DragSortView\n类似微博/微信发布动态选图九宫格。支持按压放大效果，拖拽排序，拖拽到指定位置删除。\n\n### Pub\n```yaml\ndependencies:\n  nine_grid_view: #latest version\n```\n\n### Example\n```yaml\nimport 'package:nine_grid_view/nine_grid_view.dart';\n\n// bigImage参数 单张大图建议使用中等质量图片，因为原图太大加载耗时。\nNineGridView(\n  margin: EdgeInsets.all(12),\n  padding: EdgeInsets.all(5),\n  space: 5,\n  type: NineGridType.weChat,\n  itemCount: itemCount,\n  itemBuilder: (BuildContext context, int index) {},\n);\n\n// 头像需要设置宽、高参数。\nNineGridView(\n  width: 120,\n  height: 120,\n  padding: EdgeInsets.all(5),\n  space: 5,\n  type: NineGridType.qqGp, //NineGridType.weChatGp, NineGridType.dingTalkGp\n  itemCount: itemCount,\n  itemBuilder: (BuildContext context, int index) {},\n);\n\n// 建议使用略微缩图，因为原图太大可能会引起重复加载导致闪动.\nDragSortView(\n  imageList,\n  space: 5,\n  margin: EdgeInsets.all(20),\n  padding: EdgeInsets.all(0),\n  itemBuilder: (BuildContext context, int index) {},\n  initBuilder: (BuildContext context) {},\n  onDragListener: (MotionEvent event, double itemWidth) {\n    /// 判断拖动到指定位置删除\n    /// return true;\n    if (event.globalY \u003e 600) {\n      return true;\n    }\n    return false;\n  },\n);     \n```\n\n### Screenshots\n\n截图无法查看？  \n掘金地址：[Flutter 仿微信/微博九宫格](https://juejin.im/post/5ee825ab5188251f3f07af75)、[Flutter 仿QQ讨论组头像](https://juejin.im/post/5efd42665188252e6350d496)  \n简书地址：[Flutter 仿微信/微博九宫格](https://www.jianshu.com/p/73548cc82326)\n\n|![](https://s1.ax1x.com/2020/08/05/ar88bR.jpg)|![](https://s1.ax1x.com/2020/08/05/arG6OJ.jpg)|![](https://s1.ax1x.com/2020/08/05/artZyF.jpg)|\n|:---:|:---:|:---:|\n|![](https://s1.ax1x.com/2020/08/05/artlJx.jpg)|![](https://s1.ax1x.com/2020/08/05/artJyD.jpg)|![](https://s1.ax1x.com/2020/08/05/art2wj.jpg)|\n|![](https://s1.ax1x.com/2020/08/05/art4f0.jpg)|![](https://s1.ax1x.com/2020/08/05/artIpV.jpg)|![](https://s1.ax1x.com/2020/08/05/artXkR.gif)|\n\n## Changelog\nPlease see the [Changelog](CHANGELOG.md) page to know what's recently changed.\n\n## App\n[Moss App](https://github.com/Sky24n/Moss)\n\n### Others\n另外一个[NineGridView](https://github.com/flutterchina/flukit)在 [flukit](https://github.com/flutterchina/flukit) UI组件库里面，通过封装GridView实现。本项目使用的Stack + Positioned实现。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutterchina%2Fnine_grid_view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutterchina%2Fnine_grid_view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutterchina%2Fnine_grid_view/lists"}