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

calendar_viewer 표지
패키지 상세v1.1.0

calendar_viewer

예약, 이벤트 및 다국어 지원을 위해 설계된 매우 사용자 정의 가능한 캘린더 위젯입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
81
좋아요
11
Pub 점수
160

패키지 설치

flutter pub add calendar_viewer

패키지 개요

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

예약, 이벤트 및 다국어 표시를 지원하는 Flutter용 고도로 사용자 정의 가능한 캘린더 위젯입니다. 유연한 스타일링, 이벤트 통합, 그리고 안드로이드, iOS, 웹, macOS, Windows, 리눅스 간의 원활한 크로스플랫폼 호환성을 제공합니다. 개발자를 위한 설계로 날짜, 헤더, UI 컴포넌트를 쉽게 맞춤설정하면서 성능과 반응성을 유지할 수 있습니다. 동적 날짜 선택과 국제화가 필요한 앱에 적합합니다.

사용 사례

  • 이벤트 스케줄링
  • 예약 시스템
  • 다국어 달력
  • 날짜 선택기 통합
  • 시간 관리 앱
  • 여행 예약 인터페이스

주요 기능

  • 사용자 정의 가능한 UI 테마
  • 다국어 지원
  • 이벤트 강조
  • 크로스 플랫폼 호환성
  • 반응형 디자인
  • 사용자 정의 가능한 날짜 범위

적합한 대상

  • 예약 앱을 개발하는 개발자
  • 국제화된 캘린더가 필요한 팀
  • 복잡한 날짜 상호작용을 가진 앱
  • 사용자 인터페이스 중심의 캘린더 구현
  • 경량 캘린더 위젯이 필요한 프로젝트

고려 사항

  • 수동 이벤트 데이터 처리가 필요합니다
  • 제한된 내장 시간대 지원
  • 네이티브 반복 이벤트 로직 없음
  • 스타일링은 깊이 있는 사용자 정의가 필요할 수 있습니다
  • 완전한 i18n을 위해 외부 로컬라이제이션 패키지에 의존합니다

원본 README

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

pub package github linkedin

Calendar Viewer

A highly customizable calendar widget designed for reservations, events, and multi-language support.

Calendar

Table of Contents

  1. Installing
  2. Features
  3. Usage
  4. Example Project
  5. Properties
  6. Events
  7. Contributors

🖥 Installing

Add Dependency
dependencies:
  calendar_viewer: ^1.1.0 # Use the latest version
Import Package
import 'package:calendar_viewer/calendar_viewer.dart';

✨ Features

  • Customizable month tabs and week bars.
  • Multi-language support for month and weekday names.
  • Add reservations spanning multiple dates.
  • Customizable styles for dates, weekdays, and reservations.
  • Support for event handling like taps and long presses on dates.

📖 Usage

Basic Example:
/// Use [CalendarPageViewer] if you want to show only one month at a time.
/// with no tab bar.
///
/// Use [CalendarListViewer] if you want to show all months at a time.
/// with a scrollable list.
CalendarTabBarViewer(
  initialDate: DateTime.now(),
  months: ['Jan', 'Feb', ...], // List of 12 months
  weekdays: ['Mon', 'Tue', ...], // List of 7 weekdays
  outsideDateConfig: CalendarDateConfig(
      decoration: BoxDecoration(
        color: Colors.black12,
        border: Border.all(color: Colors.black12, width: 0.5),
      ),
    ),
);
Advanced Configuration:
/// Use [CalendarPageViewer] if you want to show only one month at a time.
/// with no tab bar.
///
/// Use [CalendarListViewer] if you want to show all months at a time.
/// with a scrollable list.
CalendarTabBarViewer(
  key: Key(_selectedDate.toString()),
  initialDate: _selectedDate,
  months: ['January', 'February', ...],
  weekdays: ['Monday', 'Tuesday', ...],
  dateConfigBuilder: (date) {
    if (date.isAtSameMomentAs(DateTime(_now.year, _now.month, _now.day))) {
      return CalendarDateConfig(
        decoration: BoxDecoration(
          color: Colors.teal.withValues(alpha: .6),
          borderRadius: BorderRadius.circular(5),
        ),
      );
    } else if(date.isAtSameMomentAs(_selectedDate)) {
      return CalendarDateConfig(
        decoration: BoxDecoration(
          color: Colors.blue.withValues(alpha: .6),
          borderRadius: BorderRadius.circular(5),
        ),
      );
    }
    return null;
  },
  reservations: [
    CalendarViewerReservation(
      from: DateTime(2023, 10, 9),
      to: DateTime(2023, 10, 13),
      user: const CalendarReservationUser(
        name: 'Mohammad Alamoudi',
        netImage:
            'https://cdn-icons-png.flaticon.com/512/9203/9203764.png',
      ),
    ),
  ],
  reservation: CalenderReservationConfig(
    style: CalendarReservationStyle(
      color: Colors.teal.withValues(alpha: .6),
    ),
  ),
  outsideDateConfig: CalendarDateConfig(
      decoration: BoxDecoration(
        color: Colors.black12,
        border: Border.all(color: Colors.black12, width: 0.5),
      ),
    ),
);

📱 Example Project

  • Pub Example: Available on pub.dev.
  • GitHub Example Project: Available on GitHub.

📋 Properties

Property Description
initialDate The initial date used to calculate the selected month/year.
months List of 12 month names in your app's locale.
weekdays List of 7 weekday names in your app's locale.
reservation Configures reservations (e.g., style, data).
dateConfig Default configuration for calendar dates.
dateConfigBuilder Function to customize the style of specific dates.
onWeekdayTap Callback triggered on weekday tap with weekday and month as arguments.
customWeekdayStyle Map of styles for specific weekdays (e.g., weekends).
monthsTabBarConfig Configuration for the months tab bar.
outsideDateConfig Secondary default configuration for out-of-bounds dates.
outsideDateConfigBuilder Function to dynamically customize specific dates outside the active month.
startWeekday Target integer (1 = Monday, 7 = Sunday) to set fixed start alignment.
alwaysShowFullRows Locks view to perfectly output 6 rows or 5 rows maintaining aspect ratio.
showOutsideDays Whether to display padded days extending into previous/next calendar month.

🎯 Events

Event Description
onWeekdayTap Triggered when a weekday is tapped. Passes weekday and month.
onTap (in dates) Triggered when a specific date is tapped.
onLongPress (in dates) Triggered when a specific date is long-pressed.

👨🏻‍💻 Contributors

Feel free to contribute by submitting issues or feature requests on GitHub! 😊

카테고리

소스 저장소

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

아직 데이터가 없습니다.