FLUTTER ECOSYSTEM

flutterchina/nine_grid_view

Flutter NineGridView & DragSortView. 웨이보/위챗의 9개 그리드 뷰 컨트롤과 유사하여 이미지를 표시합니다. Flutter로 위챗/웨이보 9개 그리드, 드래그 정렬, 위챗 그룹, 딩딩 그룹, QQ 토론 그룹 아바타를 모방합니다.

nine_grid_view 프로젝트 이미지
Stars
338
Forks
55
최근 푸시(UTC)
2022. 6. 10.
프로젝트 상태
활성
Flutter中国开源项目 GitHub avatar
GITHUB Organization

Flutter中国开源项目 ↗

旨在开发一系列Flutter SDK之外常用的Package、插件,丰富Flutter第三方库,为Flutter生态贡献来自中国开发者的力量,欢迎所有志同道合的同学一起加入。Initiated by @wendux

中国
언어DartRubySwiftJavaObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Language: English | 中文简体

Pub      Pub

NineGridView

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.

DragSortView

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.

Pub
dependencies:
  nine_grid_view: ^2.0.0
Example
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;
  },
);   
Screenshots
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

Changelog

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

Others

Another NineGridView in flukit UI Kit,using GridView implementation。But in this project used Stack + Positioned。

App

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