패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.0

sliver_calendar

flutter용 달력 보기 표시

30일 다운로드
32
좋아요
22
Pub 점수
40

패키지 설치

flutter pub add sliver_calendar

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

스크롤 가능하고 효율적인 레이아웃에서 날짜를 표시하기 위해 슬리버 기반의 캘린더 뷰를 제공하는 플러터 패키지입니다. 사용자 정의 스크롤 뷰 내에서 사용하도록 설계되었으며, 부드러운 스크롤링과 동적 날짜 렌더링을 지원합니다. 최소한의 보일러플레이트로 깔끔하고 인터랙티브한 캘린더 인터페이스가 필요한 앱에 적합합니다. 제공된 add 명령어를 사용하여 기존 플러터 프로젝트에 원활하게 통합할 수 있습니다.

사용 사례

  • 스크롤 가능한 캘린더에서 일일 이벤트 표시
  • 예약 스케줄링 인터페이스 구축
  • 스크롤 가능한 양식에 날짜 선택기 통합
  • 타임라인 기반 애플리케이션 만들기
  • 대시보드에서 달력 보기 구현

주요 기능

  • Sliver 기반 성능 최적화
  • 사용자 정의 가능한 날짜 셀 스타일
  • 이벤트 마커 지원
  • 내장된 탐색 컨트롤
  • 큰 날짜 범위에 대한 효율적인 렌더링

적합한 대상

  • 스크롤 가능한 캘린더 UI를 개발하는 개발자
  • 경량 캘린더 컴포넌트가 필요한 앱
  • CustomScrollView를 사용하는 프로젝트
  • 성능과 확장성을 우선시하는 팀
  • Flutter 초보자가 슬리버를 탐색하고 있습니다

고려 사항

  • CustomScrollView 내부에 통합되어야 합니다
  • 제한된 내장 이벤트 관리
  • 네이티브 로컬라이제이션 지원 없음
  • 복잡한 테마를 위해 추가 스타일링이 필요할 수 있습니다
  • 이벤트 데이터를 위해 외부 상태 관리에 의존합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Calendar

Shows a scrolling calendar list of events. This is still relatively basic, it always assumes that the getEvents returns the entire list of calendar events (mostly ignoring the values passed into the source). It does work however :) Optionally, you can use an image as a background for the calendar header and another image for the month header.

The calendar uses slivers to display the widgets in the view and lets you scroll forward and backward through the events. The header widget will drop down and open up the days of the month, letting you select specific days as well as move back and forth between the months. By default it displays a list of events and not a day view, the day view code is all just a stub right now.

Here is how to use the calendar widget itself:

new CalendarWidget(
              initialDate: new TZDateTime.now(local),
              buildItem: buildItem,
              getEvents: getEvents,
            );

How to setup a source for the calendar widget.

...
  List<Game> _listToShow;
  StreamSubscription<UpdateReason> _listening;

  @override
  Widget buildItem(BuildContext context, CalendarEvent event) {
    return new GameCard(_listToShow[event.index]);
  }

  @override
  List<CalendarEvent> getEvents(DateTime start, DateTime end) {
    if (_listToShow == null) {
      _listToShow = UserDatabaseData.instance.games.values.toList();
    }
    if (_listToShow == null) {
      return [];
    }
    List<CalendarEvent> events = new List<CalendarEvent>();
    int pos = 0;
    _listToShow.forEach((Game g) => events.add(new CalendarEvent(
        instant: g.tzTime, instantEnd: g.tzEndTime, index: pos++)));
    return events;
  }
...

Example of the calendar widget in action:

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.