Skip to content
项目

关于

Flutter NineGridView & DragSortView. Similar to Weibo / WeChat nine grid view controls to display pictures. Flutter仿微信/微博九宫格、拖拽排序,微信群组,钉钉群组,QQ讨论组头像。

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
-1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README-ZH.md

原文

Language: English | 中文简体

Pub      Pub

NineGridView

类似微博动态,微信朋友圈,展示图片的九宫格控件。支持单张大图预览。
同时也支持微信群组,钉钉群组,QQ讨论组头像效果。

DragSortView

类似微博/微信发布动态选图九宫格。支持按压放大效果,拖拽排序,拖拽到指定位置删除。

Pub

dependencies:
  nine_grid_view: #latest version

Example

import 'package:nine_grid_view/nine_grid_view.dart';

// bigImage参数 单张大图建议使用中等质量图片,因为原图太大加载耗时。
NineGridView(
  margin: EdgeInsets.all(12),
  padding: EdgeInsets.all(5),
  space: 5,
  type: NineGridType.weChat,
  itemCount: itemCount,
  itemBuilder: (BuildContext context, int index) {},
);

// 头像需要设置宽、高参数。
NineGridView(
  width: 120,
  height: 120,
  padding: EdgeInsets.all(5),
  space: 5,
  type: NineGridType.qqGp, //NineGridType.weChatGp, NineGridType.dingTalkGp
  itemCount: itemCount,
  itemBuilder: (BuildContext context, int index) {},
);

// 建议使用略微缩图,因为原图太大可能会引起重复加载导致闪动.
DragSortView(
  imageList,
  space: 5,
  margin: EdgeInsets.all(20),
  padding: EdgeInsets.all(0),
  itemBuilder: (BuildContext context, int index) {},
  initBuilder: (BuildContext context) {},
  onDragListener: (MotionEvent event, double itemWidth) {
    /// 判断拖动到指定位置删除
    /// return true;
    if (event.globalY > 600) {
      return true;
    }
    return false;
  },
);     

Screenshots

截图无法查看?
掘金地址:Flutter 仿微信/微博九宫格、Flutter 仿QQ讨论组头像
简书地址:Flutter 仿微信/微博九宫格

Changelog

Please see the Changelog page to know what's recently changed.

App

Moss App

Others

另外一个NineGridView在 flukit UI组件库里面,通过封装GridView实现。本项目使用的Stack + Positioned实现。

探索相关项目

加载中…