v1.4.0flutter_gantt
इंटरैक्टिव और कस्टमाइज़ेबल गैंट चार्ट विजेट को रेंडर करने के लिए Flutter पैकेज।
इंटरैक्टिव और कस्टमाइज़ेबल गैंट चार्ट विजेट को रेंडर करने के लिए Flutter पैकेज।
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
A production-ready, fully customizable Gantt chart widget for Flutter applications.
Add to your pubspec.yaml:
yaml dependencies: flutter_gantt: <latest-version>
Then run:
bash flutter pub get
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)');
}
},
),
Gantt WidgetThe 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 |
GanttActivityRepresents 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}'),
)
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);
GanttActivity(
cellBuilder: (date) => YourCustomWidget(date),
titleWidget: YourTitleWidget(),
)
GanttActivity(
showIsoWeek: true,
...
)
Explore complete examples in the example folder.
We welcome contributions!
MIT – See LICENSE for details.
निर्भरता सूची 6 आइटम
{"sdk":"flutter"}^0.20.2^0.2.0^6.1.5+1^6.0.0{"sdk":"flutter"}उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗