The FlexGrid control provides a powerful and quickly way to display data in a tabular format. It is including that frozened column/row,loading more, high performance and better experience in TabBarView/PageView.

Overview

flex_grid

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Language: English| 中文简体

The FlexGrid control provides a powerful and quickly way to display data in a tabular format. It is including that frozened column/row,loading more, high performance and better experience in TabBarView/PageView.

parameter description default
frozenedColumnsCount The count of forzened columns 0
frozenedRowsCount The count of forzened rows 0
cellBuilder The builder to create cell required
cellBuilder The builder to create header required
columnsCount The count of columns, it should big than 0 required
source The data source of [FlexGrid] required
rowWrapper decorate row widget in this call back null
rebuildCustomScrollView rebuild when source is changed, It's from [LoadingMoreCustomScrollView] false
controller The [ScrollController] on vertical direction null
horizontalController The [SyncControllerMixin] for horizontal direction null
outerHorizontalSyncController The Outer [SyncControllerMixin], for example [ExtendedTabBarView] or [ExtendedPageView]. It make better experience when scroll on horizontal direction null
physics The physics on both horizontal and vertical direction null
highPerformance If true, forces the children to have the given extent(Cell height/width) in the scroll direction. false
headerStyle An immutable style describing how to create header CellStyle.header()
cellStyle An immutable style describing how to create cell CellStyle.cell()
indicatorBuilder Widget builder for different loading state, it's from [LoadingMoreCustomScrollView] null
extendedListDelegate A delegate that provides extensions, it's from [LoadingMoreCustomScrollView] null
headersBuilder The builder to custom the headers of [FlexGrid] null

source

[FlexGrid.source] is form loading_more_list, LoadingMoreBase is data collection for loading more. override loadData method to load your data. set hasMore to false when it has no more data.

class FlexGridSource extends LoadingMoreBase<GridRow> {
  int _pageIndex = 1;

  void _load() {
    for (int i = 0; i < 15; i++) {
      add(GridRow(name: 'index:$_pageIndex-$i'));
    }
  }

  @override
  bool get hasMore => _pageIndex < 4;

  @override
  Future<bool> loadData([bool isloadMoreAction = false]) async {
    await Future<void>.delayed(const Duration(seconds: 2));
    _load();
    _pageIndex++;
    return true;
  }

  @override
  Future<bool> refresh([bool notifyStateChanged = false]) async {
    _pageIndex = 1;
    return super.refresh(notifyStateChanged);
  }
}

rowWrapper

decorate row widget in this call back.

    FlexGrid(
      rowWrapper: (
        BuildContext context,
        T data,
        int row,
        Widget child,
      ) {
        return Column(
          children: <Widget>[
            child,
            const Divider(),
          ],
        );
      },
    );

headersBuilder

you can add anyother headers in this call back.

    FlexGrid(
      headersBuilder: (BuildContext b, Widget header) {
        return <Widget>[
          header,
          SliverToBoxAdapter(
            child: PullToRefreshContainer(
                (PullToRefreshScrollNotificationInfo info) {
              return PullToRefreshHeader(
                info,
                source.lastRefreshTime,
              );
            }),
          ),
        ];
      },
    );
You might also like...

This Dart package will utilize the plugin, google_mobile_ads, so to quickly and easily implement ads into a Flutter app.

This Dart package will utilize the plugin, google_mobile_ads, so to quickly and easily implement ads into a Flutter app.

Ads to your App in a Snap! This Dart package will utilize the plugin, google_mobile_ads, so to quickly and easily implement ads into a Flutter app

Sep 11, 2022

A GUI to quickly manage your WSL2 instances

A GUI to quickly manage your WSL2 instances

WSL2 Distro Manager A quick way to manage your WSL2 instances with a GUI. Install This app is available on the Windows Store or as a direct download f

Dec 29, 2022

𝐂𝐨𝐯 𝐀𝐡𝐞𝐚𝐝 is a mobile application to track and create better Covid-19 route maps for both shop owners and customers

𝐂𝐨𝐯 𝐀𝐡𝐞𝐚𝐝 is a mobile application to track and create better Covid-19 route maps for both shop owners and customers

Cov Ahead Cov Ahead is a mobile application where shopkeepers have an app that shows QR code and users can scan this QR code which will automatically

Jan 15, 2022

Routinger is a task scheduler app that is made to make you a better person at no extra cost. The code is open-source. Dart language and Flutter framework are used extensively.

Routinger is a task scheduler app that is made to make you a better person at no extra cost. The code is open-source. Dart language and Flutter framework are used extensively.

Routinger This is a simple app that will allow you to schedule your tasks, create a simple to-do, and also make recurring tasks. The app ends you noti

Dec 17, 2022

A better Minecraft Launcher that supports multiple platforms and many functionalities for you to explore!

A better Minecraft Launcher that supports multiple platforms and many functionalities for you to explore!

A better Minecraft Launcher that supports multiple platforms and many functionalities for you to explore!

Dec 14, 2022

Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Better Player Advanced video player based on video_player and Chewie. It's solves many typical use cases and it's easy to run. Introduction This plugi

Jan 3, 2023

An intuitive way to work with persistent data in Dart

An intuitive way to work with persistent data in Dart. Full documentation Why Brick? Out-of-the-box offline access to data Handle and hide complex ser

Dec 26, 2022

Dart package to rank proposals according to Majority Judgment, using a score-based algorithm for performance and scalability

Majority Judgment for Dart This Dart package helps to resolve polls using Majority Judgment. Features Efficient Majority Judgment algorithm, scales we

Oct 18, 2021

Comparing performance of sqlite3 and sqflite

FlutterSqliteComparison Comparing the performance of two different sqlite libraries by INSERTing 10000 rows one-by-one and then SELECTing all rows in

Jan 7, 2022
Owner
FlutterCandies
Custom Flutter candies (packages) for you to build your Flutter app easily. Enjoy it!
FlutterCandies
The Dart SDK, including the VM, dart2js, core libraries, and more.

Dart A client-optimized language for fast apps on any platform Dart is: Optimized for UI: Develop with a programming language specialized around the n

Dart 8.7k Jan 2, 2023
An app that could help doctors better consult their patients in every way possible.

doc_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Kevin Jacob 1 Oct 15, 2021
An app to show everything bus related in Singapore, including arrival times and a directory

NextBus SG An app to show everything bus related in Singapore, including bus arrival times and a directory, with extra features. ?? Gallery Click here

null 103 Sep 13, 2022
cosmic_frontmatter is a package that provides a simple way to parse the frontmatter of a markdown file.

cosmic_frontmatter cosmic_frontmatter is a package that provides a simple way to parse the frontmatter of a markdown file. Getting started To get star

cosmic.horse 9 Oct 26, 2022
A flutter app to generate beautiful, high-quality screenshots of tweets from twitter.

tweet_png A flutter app to generate beautiful, high-quality screenshots of tweets from twitter. Follow on Instagram for more using the app get your tw

Ananthu P Kanive 51 Sep 23, 2022
Audio manager - A flutter plugin for music playback, including notification handling.

audio_manager A flutter plugin for music playback, including notification handling. This plugin is developed for iOS based on AVPlayer, while android

Jerome Xiong 96 Oct 25, 2022
Slibro is a full-fledged story writing and publishing platform that supports short and long format stories

Slibro is a full-fledged story writing and publishing platform that supports short and long format stories. Flutter, Appwrite, and Rapyd is use

Souvik Biswas 7 Dec 8, 2022
A simple and customizable flutter package for inputting phone number in intl / international format

Intl Phone Number Input A simple and customizable flutter package for inputting

null 1 Jul 21, 2022
📱🌦 Flutter application to display PWS (Personal Weather Station) data

PWSWatcher Why? PWSWatcher is an open-source Android app used to monitor a PWS (Personal Weather Station) given the link of its real-time updated .xml

Giorgio Bertolotti 17 Oct 13, 2022
Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!

Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!

Sanskar Tiwari 11 Aug 28, 2021