Search packages, repositories and app categories

flutter_gantt cover
Package detailsv1.4.0

flutter_gantt

Flutter package for rendering an interactive and customizable Gantt chart widget.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.1K
Likes
27
Pub points
160

Install package

flutter pub add flutter_gantt

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Flutter Gantt is a customizable and interactive Gantt chart widget for Flutter, enabling developers to visualize project timelines, tasks, and dependencies across multiple platforms. It supports dynamic task scheduling, drag-and-drop functionality, and responsive design, making it ideal for project management applications. The package integrates seamlessly with Flutter's UI framework and offers extensive configuration options for styling and behavior. It is maintained by insideapp.it and available on GitHub for community contributions.

Use cases

  • Project timeline visualization
  • Task scheduling in apps
  • Resource planning tools
  • Agile project management
  • Team workflow tracking

Key features

  • Interactive drag-and-drop
  • Customizable task styling
  • Cross-platform support
  • Responsive layout
  • Task dependency rendering
  • Configurable zoom and scroll

Suitable for

  • Project management apps
  • Productivity tools
  • Development sprint trackers
  • Enterprise planning software
  • Educational project dashboards

Considerations

  • Requires careful handling of large datasets
  • Limited built-in theme support
  • May need additional logic for complex dependencies
  • Performance impact with many tasks
  • Documentation could be more detailed

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Gantt Chart

Pub Version Pub Points License

A production-ready, fully customizable Gantt chart widget for Flutter applications.

Gantt Chart Demo


Features

  • 💓 Scrollable timeline view
  • ↔ Draggable
  • 🎈 Complete visual customization
  • 🛳 Hierarchical activities with parent/child relationships
  • 🙳 Activity custom builder
  • 👅 Built-in date utilities and calculations
  • 🚀 Optimized for performance
  • 😱 Responsive across all platforms

Installation

Add to your pubspec.yaml:

yaml dependencies: flutter_gantt: <latest-version>

Then run:

bash flutter pub get


Quick Start

import 'package:flutter_gantt/flutter_gantt.dart';

Gantt(
  theme: GanttTheme.of(context),
  activitiesAsync: (startDate, endDate, activity) async => _activities,
  holidaysAsync: (startDate, endDate, holidays) async _holidays,
  onActivityChanged: (activity, start, end) {
    if (start != null && end != null) {
      debugPrint('$activity was moved (Event on widget)');
    } else if (start != null) {
      debugPrint(
        '$activity start was moved (Event on widget)',
      );
    } else if (end != null) {
      debugPrint('$activity end was moved (Event on widget)');
    }
  },
),

Documentation

Core Components
Gantt Widget

The main chart container with these key properties:

Property Type Description
startDate DateTime Initial visible date
activities List Activities to display
holidays List Special dates to highlight
theme GanttTheme Visual customization
controller GanttController Programmatic control
showIsoWeek bool Enables the ISO week-number row
GanttActivity

Represents a task with:

GanttActivity(
  start: DateTime.now(),
  end: DateTime.now().add(Duration(days: 5)),
  title: 'Task Name',
  color: Colors.blue,
  // Optional:
  children: [/* sub-tasks */],
  onCellTap: (activity) => print('Tapped ${activity.title}'),
)

Advanced Features
Programmatic Control
final controller = GanttController(
    startDate: DateTime.now(),
    daysViews: 30,
);

// Navigate timeline
controller.next(days: 7);   // Move forward
controller.prev(days: 14);  // Move backward

// Update data
controller.setActivities(newActivities);
Custom Builders
GanttActivity(
  cellBuilder: (date) => YourCustomWidget(date),
  titleWidget: YourTitleWidget(),
)
ISO Weeks
GanttActivity(
  showIsoWeek: true,
  ...
)

Weeks


Examples

Explore complete examples in the example folder.


Contributing

We welcome contributions!


License

MIT – See LICENSE for details.

Roadmap

  • Added limitations when dragging
  • Improving documentation
  • Improving mobile usability

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.