v2.0.0nine_grid_view
Flutter NineGridView 與 DragSortView,類似於微博/微信的九宮格視圖控制項,用於顯示圖片。
Flutter NineGridView & DragSortView。類似於微博/微信九宮格視圖控制項,用於顯示圖片。Flutter仿微信/微博九宮格、拖曳排序,微信群組,釘釘群組,QQ討論組頭像。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
Language: English | 中文简体
Similar to Weibo dynamics, WeChat circle of friends, nine grid view controls to display pictures. Support single big picture preview.
It also supports WeChat group , DingTalk group, QQ group avatar effects.
Similar to Weibo/WeChat release dynamic picture selection nine grid view. Support press to enlarge effect, drag and drop sorting, drag and drop to a specified location to delete.
dependencies:
nine_grid_view: ^2.0.0
import 'package:nine_grid_view/nine_grid_view.dart';
// bigImage param, It is recommended to use a medium-quality picture, because the original picture is too large and takes time to load.
NineGridView(
margin: EdgeInsets.all(12),
padding: EdgeInsets.all(5),
space: 5,
type: NineGridType.weChat,//NineGridType.weChat, NineGridType.weiBo
itemCount: itemCount,
itemBuilder: (BuildContext context, int index) {},
);
// group avatar.
// need width, height param.
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) {},
);
// It is recommended to use a thumbnail picture,because the original picture is too large, it may cause repeated loading and cause flashing.
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) {
/// Judge to drag to the specified position to delete
/// return true;
if (event.globalY > 600) {
return true;
}
return false;
},
);
| 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 |
|---|---|---|
| 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 |
| 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 |
Please see the Changelog page to know what's recently changed.
Another NineGridView in flukit UI Kit,using GridView implementation。But in this project used Stack + Positioned。
Moss.
A GitHub client app developed with Flutter, which supports Android iOS Web.
Web :Flutter Web.
| https://z3.ax1x.com/2021/04/26/gp1hm6.jpg | https://z3.ax1x.com/2021/04/26/gp1Tte.jpg | https://z3.ax1x.com/2021/04/26/gp17fH.jpg |
|---|