FLUTTER ECOSYSTEM

icemanbsi/flutter_time_picker_spinner

Material 시간 선택기 대신 스피너를 사용하여 시간을 설정하는 Flutter 위젯

flutter_time_picker_spinner 프로젝트 이미지
Stars
39
Forks
67
최근 푸시(UTC)
2024. 2. 17.
프로젝트 상태
활성
Bobby Stenly Irawan GitHub avatar
GITHUB User

Bobby Stenly Irawan ↗

Bali
언어DartRubyObjective-CShellJava

이 저장소가 배포한 패키지

사용 중인 의존성

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

원본 README

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

README 펼치기 / 접기

flutter_time_picker_spinner

Time Picker widget with spinner instead of a material time picker.

12H format

https://raw.githubusercontent.com/icemanbsi/flutter_time_picker_spinner/master/doc/time_picker_1.gif
24H format

https://raw.githubusercontent.com/icemanbsi/flutter_time_picker_spinner/master/doc/time_picker_2.gif
24H format with second

https://raw.githubusercontent.com/icemanbsi/flutter_time_picker_spinner/master/doc/time_picker_3.gif
Custom style

https://raw.githubusercontent.com/icemanbsi/flutter_time_picker_spinner/master/doc/time_picker_4.gif

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

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

Usage

import 'package:flutter_time_picker_spinner/flutter_time_picker_spinner.dart';

Widget widget() {
  return new TimePickerSpinner(
    is24HourMode: false,
    normalTextStyle: TextStyle(
      fontSize: 24,
      color: Colors.deepOrange
    ),
    highlightedTextStyle: TextStyle(
      fontSize: 24,
      color: Colors.yellow
    ),
    spacing: 50,
    itemHeight: 80,
    isForce2Digits: true,
    onTimeChange: (time) {
      setState(() {
        _dateTime = time;
      });
    },
  );
}