FLUTTER ECOSYSTEM

MohamedAbd0/time_picker_spinner

기본적인 매터리얼 시간 선택기 대신 스피너를 사용하는 시간 선택기입니다. 이 위젯은 12시간 또는 24시간 형식과 사용자 정의 간격 모드와 함께 작동하며, 이 패키지는 아랍어 및 영어로의 로컬라이제이션을 허용합니다.

time_picker_spinner 프로젝트 이미지
Stars
2
Forks
5
최근 푸시(UTC)
2025. 1. 13.
프로젝트 상태
활성
 Mohamed Abdo Elnashar GitHub avatar
GITHUB User

Mohamed Abdo Elnashar ↗

Senior Flutter Developer I am a software engineer with 7+ years of experience, interested in mobile applications for more than 6 years, studying for a master's

Dscale.ioDubai, UAE
언어C++DartCMakeSwiftCHTMLKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

time_picker_spinner

Time Picker with spinner instead of a default material time picker. This widget works with 12 or 24 hour format and custom interval mode, 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_picker_spinner: any
  1. Get the package using your IDE's GUI or via command line with
$ pub get
  1. Import the time_picker_spinner.dart file in your app
import 'package:time_picker_spinner/time_picker_spinner.dart';

Features

  • This widget works with 12.
  • This widget works with 24.
  • allow localization ar and en.

Usage

EN
en short en long

image | image

TimePickerSpinner(
              locale: const Locale('en', ''),
              time: dateTime,
              is24HourMode: false,
              isShowSeconds: true,
              itemHeight: 80,
              normalTextStyle: const TextStyle(
                fontSize: 24,
              ),
              highlightedTextStyle:
                  const TextStyle(fontSize: 24, color: Colors.blue),
              isForce2Digits: true,
              onTimeChange: (time) {
                setState(() {
                  dateTime = time;
                });
              },
            )
Ar
ar short ar long

image | image

TimePickerSpinner(
              locale: const Locale('ar', ''),
              time: dateTime,
              is24HourMode: false,
              isShowSeconds: true,
              itemHeight: 80,
              normalTextStyle: const TextStyle(
                fontSize: 24,
              ),
              highlightedTextStyle:
                  const TextStyle(fontSize: 24, color: Colors.blue),
              isForce2Digits: true,
              onTimeChange: (time) {
                setState(() {
                  dateTime = time;
                });
              },
            )

Props

props types defaultValues
time DateTime Current Time [ DateTime.now() ]
minutesInterval int 1
secondsInterval int 1
is24HourMode bool true
isShowSeconds bool false
isShowSeconds bool false
highlightedTextStyle TextStyle false
normalTextStyle TextStyle false
itemHeight double 60.0
itemWidth double 45.0
spacing double 20.0
alignment AlignmentGeometry Alignment.centerRight
isForce2Digits bool false
onTimeChange TimePickerCallback
locale bool en