v1.4.0flutter_gantt
상호작용 가능하고 사용자 정의 가능한 게인트 차트 위젯을 렌더링하기 위한 Flutter 패키지입니다.
27좋아요 1.1천30일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
상호작용 가능하고 사용자 정의 가능한 게인트 차트 위젯을 렌더링하기 위한 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 ↗