hijri_picker 패키지는 히지라(이슬람) 달력에서 날짜를 선택할 수 있는 플러터 위젯을 제공하며, 특히 우름 알쿠라 달력 시스템을 지원합니다. 사용자가 최소 및 최대 날짜 범위를 사용자 정의하여 히지라 날짜를 선택할 수 있게 해주며, 이슬람 관련 애플리케이션에서 정확하고 문화적으로 적절한 날짜 선택을 보장합니다. 이 패키지는 히지라 날짜 입력이 필요한 플러터 앱 내에서의 간편성과 통합을 위해 설계되었습니다.
사용 사례
이슬람 이벤트 스케줄링
종교 앱 날짜 선택
금융 앱에서 히지라력 통합
문화 애플리케이션에서의 날짜 필터링
히지라 날짜에 대한 사용자 선호 설정
주요 기능
움 알 쿠라 히지리 달력을 지원합니다
사용자 지정 가능한 최소 및 최대 날짜 제한
Flutter UI와의 간단한 통합
정확한 히자라 날짜 변환
내장 날짜 검증
적합한 대상
무슬림 사용자를 대상으로 하는 앱
문화적 또는 종교적 응용
히지라 날짜를 사용하는 금융 시스템
캘린더 기반 스케줄링 도구
국제화된 날짜 선택기
고려 사항
히자라력에만 제한됨
피커 내에서 그레고리력 날짜 변환에 대한 지원 없음
날짜 형식을 수동으로 처리해야 합니다
플랫폼별 렌더링은 다를 수 있습니다
정확성은 외부 캘린더 로직에 따라 달라집니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Hijri Date Picker
Hijri (Umm al-Qura / Islamic calendar) date picker for Flutter.
Overview
Since v5.0.0, this package is a thin adapter that lets Flutter's built-in
Material 3 date picker render Hijri dates. It implements the
CalendarDelegate
API introduced in Flutter 3.32, so you get Flutter's showDatePicker,
CalendarDatePicker, DatePickerDialog, InputDatePickerFormField, and
YearPicker for free — with Hijri month names, Hijri weekday offsets,
Hijri month lengths, and full theming via DatePickerThemeData.
2. Home — bottom: InputDatePickerFormField, the embedded 3-column YearPicker (1447 selected), and the theming legend card.
3.showHijriDatePicker — basic dialog. Header reads "Fri, 5 DhuH"; M3 mode-toggle pencil icon in the corner.
4. Full options: custom helpText: "SELECT HIJRI DATE", uppercase cancelText/confirmText, and a selectableDayPredicate that disables Fridays (note the circled-disabled Friday 5).
5. Input mode (the pencil icon toggles to text-input). Typing 12/5/1447 in the locale's compact format — accepted by HijriCalendarDelegate.parseCompactDate.
Dark theme — Colors.blue seed
6. Same home in dark mode — Material 3 picks up the blue seed for primary/selection colors via ColorScheme.fromSeed.
7. Dark home, scrolled: input field, year grid (1447 highlighted in blue), and the dark theming legend.
8. Basic showHijriDatePicker dialog in dark mode — Hijri month name in the header, blue selection chip on day 5.
9. Full-options dialog in dark mode — Fridays disabled by predicate, day 6 (Saturday) selected.
10.DatePickerEntryMode.inputOnly — opens straight into a compact text field, no calendar.
11. Dark home scrolled — Hijri year grid 1439–1450 with 1447 selected (out-of-range years 1439–1441 dimmed).
Arabic locale (RTL)
12. Locale switched to ar_SA via the AppBar toggle. Layout flipped to RTL; calendar uses Arabic weekday abbreviations and Eastern-Arabic digits.
13.showHijriDatePicker dialog in Arabic. The cancelText/confirmText are still the English overrides we passed (demonstrating they take precedence over MaterialLocalizations).
14. Arabic input mode — compact-date field typed as 1447/12/5.
15. Embedded CalendarDatePicker + InputDatePickerFormField in Arabic — same widgets, RTL layout, Arabic month name.
16. Embedded YearPicker in Arabic — 3-column M3 year grid (1441–1450), 1447 selected.
Quick start
Register the standard Material/Widgets localization delegates:
Note on YearPicker: Flutter's YearPicker constructor defaults
currentDate to DateTime.now() (plain Gregorian) rather than
calendarDelegate.now(), which crashes with any non-Gregorian delegate.
Workaround: always pass currentDate: HijriDateTime.now() explicitly.
The other entry points (CalendarDatePicker, DatePickerDialog,
showDatePicker) handle this correctly.