Flutter의 네이티브 날짜 선택기 디자인을 영감으로 삼아 만든 월과 연도 선택 위젯을 제공하는 플러터 패키지입니다. 사용자가 깔끔하고 직관적인 인터페이스에서 특정 월과 연도를 선택할 수 있으며, 일 단위 정밀도가 필요 없는 양식에 이상적입니다. 이 선택기는 완전히 사용자 정의 가능하며 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다. Flutter의 Material 및 Cupertino 테마를 고려해 제작되어 다양한 기기 간에 일관된 UI를 보장합니다.
사용 사례
생년월일 선택
월과 연도로 데이터 필터링
기념일 날짜 설정
구독 시작 날짜 구성
졸업 연도에 들어가기
주요 기능
Material 및 Cupertino 테마 지원
크로스 플랫폼 호환성
사용자 정의 가능한 외관
간단한 API 통합
부드러운 애니메이션
외부 라이브러리에 대한 종속성 없음
적합한 대상
월/년 선택이 필요한 폼 입력
캘린더 기반 애플리케이션
사용자 프로필 설정 흐름
데이터 필터링 인터페이스
날짜 관련 기능을 갖춘 모바일 및 웹 앱
고려 사항
일자 선택이 포함되지 않음
월과 연도만 제한
날짜 형식을 수동으로 처리해야 합니다
정확한 날짜 범위에 적합하지 않습니다
비즈니스 로직을 위한 추가 검증이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Material Month/Year Picker
The month year picker inspired by the Flutter's date picker design.
Quick Start
Open your pubspec.yaml file and add this entry:
month_year_picker:^0.5.0+1
OR just run flutter pub add month_year_picker using your preferred terminal app.
Must not be null. Will be passed to the internal showDialog function call.
initialDate
Must not be null and must fall between the firstDate and lastDate. The initialDate will be truncated to its year and month components. When the month/year picker is first displayed, it will show the month/year of the initialDate, with initialDate selected.
firstDate
Must not be null. The firstDate will be truncated to its year and month components. This is the earliest allowable month/year.
lastDate
Must not be null. The lastDate will be truncated to its year and month components. This is the latest allowable month/year.
selectableMonthYearPredicate
Can be null. The function to provide full control over which month/year can be selected. If provided, only the month/year that the selectableMonthYearPredicate returns true for will be selectable.
locale
Can be null. If provided, will be used to set the locale for the month/year picker. Otherwise, it defaults to the ambient locale provided by Localizations.
useRootNavigator
Can be null. Will be passed to the internal showDialog function call.
routeSettings
Can be null. Will be passed to the internal showDialog function call.
textDirection
Can be null. If provided, will be used to set the text direction for the month/year picker. Otherwise, it defaults to the ambient locale provided by Directionality.
builder
Can be null. This parameter can be used to wrap the dialog widget with a parent widget.
initialMonthYearPickerMode
Must not be null. Can be used to have the year picker initially appear in the MonthYearPickerMode.year mode. It defaults to the MonthYearPickerMode.month mode.
Screenshots
Mode
Screenshot
Month picker in portrait mode with default locale.
Year picker in portrait mode with default locale.
Month picker in portrait mode with Malay locale.
Year picker in portrait mode with Malay locale.
Month picker in portrait mode with Arabic locale.
Year picker in portrait mode with Arabic locale.
Month picker in landscape mode with default locale.
Year picker in landscape mode with default locale.
Month picker in landscape mode with Malay locale.
Year picker in landscape mode with Malay locale.
Month picker in landscape mode with Arabic locale.
Year picker in landscape mode with Arabic locale.
Building From Source
Dependencies
Dart SDK version 3.8.0 or newer.
Flutter SDK version 3.32 or newer.
Steps
Clone this git repo into your machine.
Run .\gen-l10n.ps1 to re-generate the localised strings.
Features and Bugs
Please file feature requests and bugs at the issue tracker.
License
This project is licensed under the MIT License - see the LICENSE file for details.