Giter VIP home page Giter VIP logo

imperishablesecret / flutter_expandable_table Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rickypid/flutter_expandable_table

0.0 0.0 0.0 5.43 MB

A Flutter widget for create an expandable table with header and first column fixed.

Home Page: https://pub.dev/packages/flutter_expandable_table

License: BSD 3-Clause "New" or "Revised" License

Objective-C 0.06% Kotlin 0.26% Dart 98.99% Swift 0.68%

flutter_expandable_table's Introduction

flutter_expandable_table

Expandable Table

Pub Package Pub Points Pub Likes

Package Issue Package License

ExpandableTable is a widget for Flutter that create a Table with header and first column fixed. You can create a nested Rows/Columns grouped in expandable Row/Column

Image
ExpandableTable

Features

  • Header and first column fixed
  • Supports vertical and horizontal scroll
  • Customizable animation Duration and Curve
  • Specific height definition for each single row
  • Specific width definition for each single column
  • Access to cell address when building cell content
  • Access to the parent rows and columns of the cell while building the contents of a cell

ย 

Usage

Make sure to check out the examples on GitHub.

Installation

Add the following line to pubspec.yaml:

dependencies:
  flutter_expandable_table: <last-release>

Basic setup

Complete example available here.

     return ExpandableTable(
      firstHeaderCell: ExpandableTableCell(
        child: Text('Simple\nTable'),
      ),
      headers: headers,
      rows: rows,
    );

Use with the controller

You can create an external controller to be able to dynamically manage the table, for example to add or remove rows within it.

Here is an example:

    //... Inside Widget State
    late ExpandableTableController controller;
    //....
    @override
    void initState() {
      controller = ExpandableTableController(
        firstHeaderCell: ExpandableTableCell(child: Container()),
        headers: [],
        rows: [],
        headerHeight: 263,
        defaultsColumnWidth: 200,
        firstColumnWidth: 300,
        scrollShadowColor: AppColors.black,
      );
      super.initState();
    }
    void _onEvent(){    
      controller.rows.add(...your code...);
    }
    @override
    Widget build(BuildContext context) {
      return ExpandableTable(
        controller: controller,
      );
    }
//....

ExpandableTable Properties

  • firstHeaderCell: Is the top left cell, i.e. the first header cell.
  • headers: contains the list of all column headers, each one of these can contain a list of further headers, this allows you to create nested and expandable columns.
  • rows: ontains the list of all the rows of the table, each of these can contain a list of further rows, this allows you to create nested and expandable rows.
  • headerHeight: is the height of each column header, i.e. the first row.
  • firstColumnWidth: determines first Column width size.
  • defaultsColumnWidth: defines the default width of all columns, it is possible to redefine it for each individual column.
  • defaultsRowHeight: defines the default height of all rows, it is possible to redefine it for every single row.
  • duration: determines duration rendered animation of Rows/Columns expansion.
  • curve: determines rendered curve animation of Rows/Columns expansion.
  • scrollShadowDuration: determines duration rendered animation of shadows.
  • scrollShadowFadeInCurve: determines rendered curve animation of shadows appearance.
  • scrollShadowFadeOutCurve: determines rendered curve animation of shadows disappearance.
  • scrollShadowColor: determines rendered color of shadows.
  • scrollShadowSize: determines size of shadows.
  • visibleScrollbar: determines visibility of scrollbar.

ย 

๐Ÿ“š My open source projects

Flutter

Package Verison Score Likes Test Coverage
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes

Dart

Package Verison Score Likes Test Coverage
Pub Package Pub Points Pub Likes Test CI codecov
Pub Package Pub Points Pub Likes Test CI codecov

flutter_expandable_table's People

Contributors

rickypid avatar allato avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.