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

calender_picker 표지
패키지 상세v3.0.2

calender_picker

수평 타임라인, 단일/다중 날짜 선택, 날짜 범위 및 광범위한 사용자 정의 옵션을 갖춘 현대적이고 사용자 정의 가능한 Flutter 캘린더 선택기입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
133
좋아요
25
Pub 점수
140

패키지 설치

flutter pub add calender_picker

패키지 개요

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

수평 타임라인 뷰, 단일 및 다중 날짜 선택, 날짜 범위를 지원하는 현대적이고 고도로 사용자 정의 가능한 Flutter 캘린더 피커입니다. 다양한 스타일링 및 구성 옵션을 제공하여 플랫폼 간 앱에 원활하게 통합할 수 있습니다. Android, iOS, Web, macOS, Windows, Linux를 지원하며 개발자가 유연하고 시각적으로 매력적인 날짜 선택 경험을 원할 때 적합합니다.

사용 사례

  • 예약 앱에서 날짜 선택
  • 이벤트 스케줄링 인터페이스
  • 여행 일정 계획 도구
  • 사용자 프로필 날짜 입력 양식
  • 사용자 지정 날짜 범위 선택기

주요 기능

  • 수평 타임라인 레이아웃
  • 단일 및 다중 날짜 선택
  • 날짜 범위 지원
  • 풍부한 사용자 정의 옵션
  • 크로스 플랫폼 호환성
  • 사용자 정의 가능한 테마 및 스타일

적합한 대상

  • 여행 또는 이벤트 앱을 개발하는 개발자
  • 현대적인 UI 컴포넌트가 필요한 디자이너
  • 유연한 날짜 선택이 필요한 앱
  • 다중 플랫폼을 대상으로 하는 팀
  • 맞춤 브랜딩이 필요한 프로젝트

고려 사항

  • 날짜 범위 로직을 신중하게 다뤄야 합니다
  • 복잡한 사용 사례의 경우 추가 검증이 필요할 수 있습니다
  • 사용자 정의는 개발 시간을 늘릴 수 있습니다
  • 기본 설정 외에 문서가 제한적
  • 매우 큰 날짜 범위에 최적화되지 않음

원본 README

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

CalendarPicker

pub package License Flutter

A modern, customizable Flutter calendar picker with horizontal timeline, single/multi-date selection, date ranges, and extensive customization options for 2026 Flutter standards.

✨ Features

  • Horizontal Timeline Calendar - Smooth horizontal scrolling calendar
  • Multiple Selection Modes - Single, multiple, and range date selection
  • Date Restrictions - Min/Max dates, disabled dates, blackout dates
  • Visual Enhancements - Today highlighting, weekend highlighting
  • Infinite Scrolling - Optional infinite horizontal scrolling
  • Swipe Navigation - Touch-friendly navigation
  • Custom First Day of Week - Configurable week start
  • Full Customization - Colors, typography, spacing, decorations
  • RTL Support - Right-to-left language support
  • Full Locale Support - Internationalization ready
  • Accessibility - Screen reader support, keyboard navigation
  • Material 3 Support - Modern design system integration
  • Dark Mode - Built-in dark theme support
  • Performance Optimized - Smooth scrolling, efficient rendering

📸 Screenshots


Single Date Selection

Multiple Date Selection

Date Range Selection

Custom Styling

🚀 Quick Start

Installation

Add to your pubspec.yaml:

dependencies:
  calender_picker: ^3.0.0
Basic Usage
import 'package:calender_picker/calender_picker.dart';

CalendarPicker(
  selectionMode: CalendarSelectionMode.single,
  onDateSelected: (date) {
    print('Selected: $date');
  },
)

📖 Usage Examples

Single Date Selection
CalendarPicker(
  selectionMode: CalendarSelectionMode.single,
  initialSelection: CalendarSelection.single(DateTime.now()),
  config: const CalendarConfig(
    locale: 'en_US',
    highlightToday: true,
    highlightWeekends: true,
  ),
  onDateSelected: (date) {
    print('Selected date: $date');
  },
)
Multiple Date Selection
CalendarPicker(
  selectionMode: CalendarSelectionMode.multiple,
  config: const CalendarConfig(
    activeDates: [DateTime(2024, 1, 15), DateTime(2024, 1, 20)],
  ),
  onDatesSelected: (dates) {
    print('Selected dates: $dates');
  },
)
Date Range Selection
CalendarPicker(
  selectionMode: CalendarSelectionMode.range,
  config: const CalendarConfig(
    minDate: DateTime(2024, 1, 1),
    maxDate: DateTime(2024, 12, 31),
  ),
  onRangeSelected: (start, end) {
    if (start != null && end != null) {
      print('Selected range: $start to $end');
    }
  },
)
Custom Styling
CalendarPicker(
  style: CalendarStyle(
    selectedColor: Colors.blue,
    todayColor: Colors.orange,
    weekendColor: Colors.red.shade100,
    selectedTextStyle: const TextStyle(
      color: Colors.white,
      fontWeight: FontWeight.bold,
    ),
  ),
  onDateSelected: (date) {
    // Handle selection
  },
)
Dark Mode
CalendarPicker(
  style: CalendarStyle.dark(),
  // ... other properties
)
Material 3
CalendarPicker(
  style: CalendarStyle.material3(),
  // ... other properties
)
Using Controller
class MyWidget extends StatefulWidget {
  @override
  _MyWidgetState createState() => _MyWidgetState();
}

class _MyWidgetState extends State<MyWidget> {
  final CalendarController _controller = CalendarController();

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        CalendarPicker(
          controller: _controller,
          selectionMode: CalendarSelectionMode.multiple,
        ),
        ElevatedButton(
          onPressed: () {
            _controller.clearSelection();
          },
          child: const Text('Clear Selection'),
        ),
      ],
    );
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }
}

🎨 Customization

CalendarConfig
CalendarConfig(
  startDate: DateTime.now(),
  minDate: DateTime(2024, 1, 1),
  maxDate: DateTime(2024, 12, 31),
  disabledDates: [DateTime(2024, 1, 15)],
  activeDates: [DateTime(2024, 1, 20)],
  firstDayOfWeek: 1, // Monday
  locale: 'en_US',
  enableInfiniteScroll: true,
  daysCount: 365,
  highlightToday: true,
  highlightWeekends: true,
  enableSwipeNavigation: true,
  showMonthHeaders: true,
  height: 80,
  itemWidth: 60,
  itemSpacing: 4,
)
CalendarStyle
CalendarStyle(
  // Colors
  backgroundColor: Colors.white,
  selectedColor: Colors.blue,
  todayColor: Colors.orange,
  weekendColor: Colors.red.shade100,
  disabledColor: Colors.grey.shade300,

  // Text styles
  dayTextStyle: const TextStyle(fontSize: 11, fontWeight: FontWeight.w500),
  dateTextStyle: const TextStyle(fontSize: 24, fontSize: FontWeight.w600),
  monthTextStyle: const TextStyle(fontSize: 11, fontWeight: FontWeight.w500),

  // Decorations
  selectedDecoration: BoxDecoration(
    color: Colors.blue,
    borderRadius: BorderRadius.circular(25),
  ),

  // Spacing
  itemPadding: const EdgeInsets.all(8),
  itemBorderRadius: 25,
)

🔧 API Reference

CalendarPicker
Property Type Description
selectionMode CalendarSelectionMode Selection mode (single/multiple/range)
initialSelection CalendarSelection? Initial selection state
config CalendarConfig Calendar configuration
style CalendarStyle? Visual styling
controller CalendarController? Optional controller
onDateSelected ValueChanged<DateTime>? Single date selection callback
onDatesSelected ValueChanged<List<DateTime>>? Multiple dates selection callback
onRangeSelected Function(DateTime?, DateTime?)? Range selection callback
onMonthChanged ValueChanged<DateTime>? Month change callback
onDisabledDateTap ValueChanged<DateTime>? Disabled date tap callback
CalendarController
Method Description
selectDate(DateTime) Select a single date
toggleDate(DateTime) Toggle date in multi-selection
selectDates(List<DateTime>) Set multiple dates
selectRange(DateTime?, DateTime?) Set date range
clearSelection() Clear all selections
dispose() Dispose controller

🌍 Localization

The package supports full internationalization:

CalendarPicker(
  config: const CalendarConfig(
    locale: 'es_ES', // Spanish
  ),
)

Supported locales depend on the intl package. Make sure to initialize date formatting:

import 'package:intl/date_symbol_data_local.dart';

void main() async {
  await initializeDateFormatting('es_ES', null);
  runApp(MyApp());
}

♿ Accessibility

The calendar includes comprehensive accessibility features:

  • Screen reader support with descriptive labels
  • Keyboard navigation
  • High contrast support
  • Semantic markup
  • Focus management

🧪 Testing

Run tests:

flutter test

Run example app:

cd example
flutter run

📋 Migration Guide

From v2.x to v3.0
  1. Update pubspec.yaml:

    dependencies:
      calender_picker: ^3.0.0
    
  2. Update imports:

    // Old
    import 'package:calender_picker/calender_picker.dart';
    CalenderPicker(...)
    
    // New
    import 'package:calender_picker/calender_picker.dart';
    CalendarPicker(...)
    
  3. Update constructor:

    // Old
    CalenderPicker(
      DateTime.now(),
      enableMultiSelection: true,
      onDateChange: (date) => print(date),
    )
    
    // New
    CalendarPicker(
      selectionMode: CalendarSelectionMode.multiple,
      onDatesSelected: (dates) => print(dates),
    )
    
  4. Update styling:

    // Old
    CalenderPicker(
      selectionColor: Colors.blue,
      selectedTextColor: Colors.white,
    )
    
    // New
    CalendarPicker(
      style: const CalendarStyle(
        selectedColor: Colors.blue,
        selectedDayTextStyle: TextStyle(color: Colors.white),
        selectedDateTextStyle: TextStyle(color: Colors.white),
      ),
    )
    

📋 Version History

Version Date Highlights
3.0.2 2026-05-11 Version bump to 3.0.2 (3.0.1 already published); enhanced README version history with detailed entries for all releases
3.0.1 2026-05-11 Fixed screenshot references to use correct .jpg files; switched images to GitHub raw URLs for pub.dev display; updated GitHub URLs to correct repository
3.0.0 2026-05-11 Major rewrite: Modern architecture, multiple selection modes (single/multi/range), Material 3, dark mode, accessibility, RTL support, controller pattern, performance optimizations
2.0.2 2023-12-21 Dependencies upgraded
2.0.1 2023-03-24 Screenshots added
2.0.0 2023-03-24 Fixed date scroll issue, upgraded to Flutter 3.0
1.0.7 2021-11-29 Date format fixes
1.0.6 2021-11-27 Date format fixes
1.0.5 2021-11-27 Day format issues fixed
1.0.4 2021-11-27 State management problems fixed
1.0.3 2021-11-27 Removed debug print statements
1.0.2 2021-10-13 Added multi-date selection listener function
1.0.1 2021-10-08 Screenshots added
1.0.0 2021-10-08 Alignment problems fixed
0.0.4 2021-10-07 Screenshots added
0.0.3 2021-10-07 Initial screenshots added
0.0.2 2021-10-06 Basic functionality, updated Readme, multi-select date option, removed time from selected date
0.0.1 2021-10-05 Initial release

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

MIT License - see LICENSE file.

🙏 Acknowledgments

  • Built with Flutter
  • Uses intl for internationalization
  • Inspired by modern calendar interfaces

Made with ❤️ for the Flutter community

카테고리

의존성

의존성 목록 2 개

소스 저장소

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

아직 데이터가 없습니다.