dashboard_grid 0.0.6 copy "dashboard_grid: ^0.0.6" to clipboard
dashboard_grid: ^0.0.6 copied to clipboard

Configurable dashboard widget, which allows drag and drop

Coverage

This package allows to show users dashboard, with drag and drop support in Edit Mode.

Features #

  • Can place widgets programatically by specifying X,Y of the widget
  • Shifts widgets if newly placed widget overlaps with existin widgets

Getting started #

flutter pub add dashboard_grid

Usage #

Create config

final dashboardConfig = DashboardGrid(
    maxColumns: 4,
);

Dashboard Config has a listener which can notify when config has changed during edit mode by draf and drop, or when widget added programmatically

void _configListener() {
    setState(() {});
}

dashboardConfig.addListener(_configListener);

You can add widget to the dashboard

dashboardConfig.addWidget(
    DashboardWidget(
        id: id,     // Unique Id for the widget to easy locate it
        x: 0,       // X coordinate where you can place the widget
        y: 0,       // Y coordinate where you can place the widget
        width: 1,   // Width in column size
        height: 2,  // height in column size
        builder: (context) {
            return YourWidgetHere();
        },
    ),
),

Supply config during widget creation

Dashboard(
    editMode: editMode,
    config: dashboardConfig,
);

Additional information #

Whats next:

  • Add example folder
  • Allow widgets with height more than 1
2
likes
140
points
317
downloads

Publisher

unverified uploader

Weekly Downloads

Configurable dashboard widget, which allows drag and drop

Repository (GitHub)
View/report issues

Topics

#widget

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

collection, flutter

More

Packages that depend on dashboard_grid