FLUTTER ECOSYSTEM

IvanHerreraCasas/dynamic_timeline

일일 타임라인, 시간표, 간트 차트 등 만들기 위한 위젯입니다.

dynamic_timeline 프로젝트 이미지
Stars
14
Forks
7
최근 푸시(UTC)
2023. 6. 18.
프로젝트 상태
활성
Ivan GitHub avatar
GITHUB User

Ivan ↗

Piura, Peru
언어DartC++CMakeHTMLCSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 5 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • mockito개발 의존성^5.4.0
  • shouldly개발 의존성^0.5.0+1
  • very_good_analysis개발 의존성^5.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

pub package style: very good analysis License: MIT Codecov

A widget to create daily timelines, timetables, gantt charts* and more.

Note: This package is in early stage and has not been tested with large amount of data.

Daily timeline

Daily timeline

Weekly timetable

Weekly timetable styled Weekly timetable

Gantt chart

Gantt chart styled Gantt chart

Features

  • Easy to use API.
  • Rezizable timeline items.
  • Custom label builder.

Usage

Installation

Add the following line to pubspec.yaml:

dependencies:
  dynamic_timeline: ^0.1.2

Basic set up

Make sure to check out the example for more details.

Dynamic timeline requires you to provide firstDateTime, lastDateTime, labelBuilder and a list of items.

  • labelBuilder: Used to build the label of each mark, normally a dateFormat will be used.
  • items: The events of the timeline, who are positioned according to its start and end date times.

Another important property is intervalDuration, that is the lenght of time between each mark.

Example of a daily timeline.

DynamicTimeline(
    firstDateTime: DateTime(1970, 1, 1, 7),
    lastDateTime: DateTime(1970, 1, 1, 22),
    labelBuilder: DateFormat('HH:mm').format,
    intervalDuration: const Duration(hours: 1),
    children: [
      TimelineItem(
        startDateTime: DateTime(1970, 1, 1, 7),
        endDateTime: DateTime(1970, 1, 1, 8),
        child: const Event(title: 'Event 1'),
      ),
      TimelineItem(
        startDateTime: DateTime(1970, 1, 1, 10),
        endDateTime: DateTime(1970, 1, 1, 12),
        child: const Event(title: 'Event 2'),
      ),
      TimelineItem(
        startDateTime: DateTime(1970, 1, 1, 15),
        endDateTime: DateTime(1970, 1, 1, 17),
        child: const Event(title: 'Event 3'),
      ),
    ],
),