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

time_slot 표지
패키지 상세v1.0.2

time_slot

지정된 시간 간격 또는 일시 목록을 사용하여 시간 슬롯을 만들고 시간의 시간대 이름을 얻는 데 도움이 되는 새로운 Flutter 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
632
좋아요
32
Pub 점수
140

패키지 설치

flutter pub add time_slot

패키지 개요

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

time_slot 패키지는 플러터를 위한 유틸리티로, 시간 슬롯의 생성 및 관리를 간소화하도록 설계되었습니다. 지정된 기간 또는 사용자 정의 일시 목록을 기반으로 시간 간격을 생성할 수 있습니다. 또한 주어진 시간에 해당하는 하루의 시간대(예: 오전, 오후, 저녁)를 결정하는 기능도 제공합니다. 스케줄링 앱, 예약 시스템 또는 구조화된 시간 표현이 필요한 모든 응용 프로그램에 적합하며, Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다.

사용 사례

  • 예약 일정 조정
  • 예약 시스템 시간 선택
  • 이벤트 기획 도구
  • 시간 기반 UI 컴포넌트
  • 일일 활동 추적

주요 기능

  • 간격 또는 목록에서 시간 슬롯 생성
  • 시간에서 하루의 시간대 이름 결정
  • 크로스 플랫폼 호환성
  • 간단한 API 통합
  • 사용자 정의 시간 범위를 지원합니다
  • 경량이고 빠름

적합한 대상

  • 캘린더 및 예약 앱
  • 시간 기반 데이터 시각화
  • 사용자 친화적인 시간 선택기
  • 모바일 및 웹 스케줄링 인터페이스
  • 시간 슬롯 논리를 필요로 하는 개발자

고려 사항

  • 시간대 차이를 수동으로 처리해야 합니다
  • 시간대 생성 및 시간대 탐지에 국한됨
  • 내장된 UI 컴포넌트 없음
  • 반복 시간 패턴을 지원하지 않습니다
  • 입력 시간이 유효하고 정렬되어 있다고 가정합니다

원본 README

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

time_slot

A new Flutter package which helps in creating time slots with given time interval or list of date times and get day part name of time, and this package allow localization ar and en.

Pub Version

Demo gif

image

Installation

  1. Add this to your package's pubspec.yaml file:
dependencies:
  time_slot: any
  1. Get the package using your IDE's GUI or via command line with
$ pub get
  1. Import the time_slot.dart file in your app
import 'package:time_slot/time_slot.dart';

Features

  • Creating time slots with given time interval
  • Creating time slots with given list date times
  • Get day part name of time
  • Support for multiple selection
  • Support different display options

Usage

DayPartController image

  DayPartController dayPartController = DayPartController();

to get day part of time

  DayParts dayPart = dayPartController.getDayPartOfTime(
    time: DateTime(2023, 1, 1, 10, 30),
  ); ///  DayParts.morning

to get day part name from DayParts

  DayParts dayPart = dayPartController.getDayPartName(dayPart: dayPart),);
  /// morning

TimesSlotGridViewFromInterval

to build time slot grid view from interval (10:00 AM to 10:00 PM) every hour

image

            TimesSlotGridViewFromInterval(
                locale: "en",
                initTime: selectTime,
                crossAxisCount: 4,
                timeSlotInterval: const TimeSlotInterval(
                  start: TimeOfDay(hour: 10, minute: 00),
                  end: TimeOfDay(hour: 22, minute: 0),
                  interval: Duration(hours: 1, minutes: 0),
                ),
                onChange: (value) {
                  setState(() {
                    selectTime = value;
                  });
                },
              ),

locale = "ar",

                TimesSlotGridViewFromInterval(
                locale: "ar",
                initTime: selectTime,
                crossAxisCount: 4,
                timeSlotInterval: const TimeSlotInterval(
                  start: TimeOfDay(hour: 10, minute: 00),
                  end: TimeOfDay(hour: 22, minute: 0),
                  interval: Duration(hours: 1, minutes: 0),
                ),
                onChange: (value) {
                  setState(() {
                    selectTime = value;
                  });
                },
              ),

TimesSlotGridViewFromList

to build time slot grid view from list date.

image

            TimesSlotGridViewFromList(
                locale: "en",
                initTime: selectTime,
                crossAxisCount: 4,
                listDates: [
                  DateTime(2023, 1, 1, 10, 30),
                  DateTime(2023, 1, 1, 11, 30),
                  DateTime(2023, 1, 1, 12, 30),
                  DateTime(2023, 1, 1, 13, 30),
                  DateTime(2023, 1, 1, 14, 30),
                  DateTime(2023, 1, 1, 15, 30)
                ],
                onChange: (value) {
                  setState(() {
                    selectTime = value;
                  });
                },
              ),

locale = "ar",

                TimesSlotGridViewFromList(
                locale: "ar",
                initTime: selectTime,
                crossAxisCount: 4,
                listDates: [
                  DateTime(2023, 1, 1, 10, 30),
                  DateTime(2023, 1, 1, 11, 30),
                  DateTime(2023, 1, 1, 12, 30),
                  DateTime(2023, 1, 1, 13, 30),
                  DateTime(2023, 1, 1, 14, 30),
                  DateTime(2023, 1, 1, 15, 30)
                ],
                onChange: (value) {
                  setState(() {
                    selectTime = value;
                  });
                },
              ),

카테고리

의존성

의존성 목록 1 개

소스 저장소

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

아직 데이터가 없습니다.