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

custom_date_range_picker 표지
패키지 상세v1.2.0

custom_date_range_picker

Android 및 iOS용 Flutter 패키지로 아름다운 UI와 부드러운 애니메이션을 갖춘 사용자 정의 가능한 날짜 범위 선택기를 제공합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
4천
좋아요
85
Pub 점수
160

패키지 설치

flutter pub add custom_date_range_picker

패키지 개요

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

Android, iOS, Web, macOS, Windows, Linux용으로 고도로 사용자 정의 가능한 날짜 범위 선택기 제공하는 플러터 패키지입니다. 부드러운 애니메이션과 우아한 사용자 인터페이스를 갖추고 있어 개발자가 앱 디자인에 맞게 선택기의 외관과 동작을 맞춤 설정할 수 있습니다. 시각적 피드백을 제공하는 직관적인 날짜 선택 기능을 지원하여 예약 시스템, 일정 관리 앱, 데이터 필터링 인터페이스에 적합합니다. 크로스플랫폼 호환성을 고려해 설계되어 다양한 기기에서 일관된 사용자 경험을 보장합니다.

사용 사례

  • 예약 및 예약 시스템
  • 일자 범위에 따른 데이터 필터링
  • 이벤트 스케줄링 앱
  • 여행 계획 도구
  • 사용자 정의 캘린더 통합

주요 기능

  • 크로스 플랫폼 지원
  • 부드러운 애니메이션
  • 높은 사용자 정의 가능한 UI
  • 직관적인 날짜 선택
  • 선택된 범위에 대한 시각적 피드백

적합한 대상

  • 여행 또는 예약 앱을 개발하는 개발자
  • 다양한 플랫폼 간에 일관된 날짜 선택기가 필요한 팀
  • 맞춤형 캘린더 디자인을 필요로 하는 앱
  • 사용자 경험과 미학에 중점을 둔 프로젝트

고려 사항

  • 기존 날짜 처리 로직과의 통합이 필요합니다
  • 복잡한 테마를 위해 추가 스타일링이 필요할 수 있습니다
  • 날짜 범위 선택에 한정됨(시간 구성 요소 없음)
  • Flutter SDK 버전 호환성에 의존합니다

원본 README

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

custom_date_range_picker

custom_date_range_picker

Usage

...
  floatingActionButton: FloatingActionButton(
        onPressed: () {
          showCustomDateRangePicker(
            context,
            dismissible: true,
            minimumDate: DateTime.now().subtract(const Duration(days: 30)),
            maximumDate: DateTime.now().add(const Duration(days: 30)),
            endDate: endDate,
            startDate: startDate,
            backgroundColor: Colors.white,
            primaryColor: Colors.green,
            onApplyClick: (start, end) {
              setState(() {
                endDate = end;
                startDate = start;
              });
            },
            onCancelClick: () {
              setState(() {
                endDate = null;
                startDate = null;
              });
            },
          );
        },
        tooltip: 'choose date Range',
        child: const Icon(Icons.calendar_today_outlined, color: Colors.white),
      ),

Function: showCustomDateRangePicker

This function displays a custom date range picker dialog box.

Parameters

  • context (required): The context in which to show the dialog.
  • dismissible (required): A boolean value indicating whether the dialog can be dismissed by tapping outside of it.
  • minimumDate (required): A DateTime object representing the minimum allowable date that can be selected in the date range picker.
  • maximumDate (required): A DateTime object representing the maximum allowable date that can be selected in the date range picker.
  • startDate (optional): A nullable DateTime object representing the initial start date of the date range selection.
  • endDate (optional): A nullable DateTime object representing the initial end date of the date range selection.
  • onApplyClick (required): A function that takes two DateTime parameters representing the selected start and end dates, respectively, and is called when the user taps the "Apply" button.
  • onCancelClick (required): A function that is called when the user taps the "Cancel" button.
  • backgroundColor (required): The background color of the dialog.
  • primaryColor (required): The primary color of the dialog.
  • fontFamily (optional): The font family to use for the text in the dialog.

Usage

Inside the function, a FocusNode is requested to take focus away from any input field that might be in focus. A showDialog function is then called to show the CustomDateRangePicker dialog box. The CustomDateRangePicker widget is built with the parameters passed to showCustomDateRangePicker, and then passed as the builder parameter of the showDialog function.

When the user interacts with the CustomDateRangePicker dialog box, the onApplyClick and onCancelClick functions are called accordingly.

Many Thanks to the creator of this Repo https://github.com/mitesh77/Best-Flutter-UI-Templates

Getting Started

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

For help on editing package code, view the documentation.

카테고리

의존성

의존성 목록 1 개

소스 저장소

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