Pakete, Repositories und App-Kategorien suchen

GitHub-Repositoryinsideapp-srl/flutter_gantt

flutter_gantt

Flutter-Paket zum Rendern eines interaktiven und anpassbaren Gantt-Diagramm-Widgets.

Projektcover von flutter_gantt
Sterne
18
Forks
9
Letzter Push (UTC)
28.04.2026
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

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
InsideApp GitHub avatar
GitHub-Autor

InsideApp ↗

Engineering simplicity through technology

SprachenDartC++CMakeSwiftCRubyHTMLKotlinObjective-C

Kategorien

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 6 Einträge

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗