Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

daynighttimepicker

a day night time picker for flutter. beautiful day and night animation with sun and moon assets.

default style:

daynighttimepicker

ios style:

example_ios_style

view it on pub.dev


installation

add to pubspec.yaml.

dependencies:
  day_night_time_picker:

usage

to use plugin, just import package

import 'package:day_night_time_picker/day_night_time_picker.dart';

example

flatbutton(
    onpressed: () {
        navigator.of(context).push(
            showpicker(
                context: context,
                value: _time,
                onchange: ontimechanged,
            ),
        );
    },
    child: text(
        "open time picker",
        style: textstyle(color: colors.white),
    ),
),

props

name description default
value required display value. it takes in [timeofday].
onchange required return the new time the user picked as [timeofday].
onchangedatetime optional return the new time the user picked as [datetime].
is24hrformat show the time in timepicker in 24 hour format. false
accentcolor accent color of the timepicker. theme.of(context).accentcolor
unselectedcolor color applied unselected options (am/pm, hour/minute). colors.grey
canceltext text displayed for the cancel button. cancel
oktext text displayed for the ok button. ok
sunasset image asset used for the sun. asset provided
moonasset image asset used for the moon. asset provided
blurredbackground whether to blur the background of the [modal]. false
barriercolor color of the background of the [modal]. colors.black45
borderradius border radius of the [container] in [double]. 10.0
elevation elevation of the [modal] in [double]. 12.0
barrierdismissible whether clicking outside should dismiss the [modal]. true
iosstylepicker whether to display a ios style picker (not exactly the same). false
hourlabel the label to be displayed for hour picker. only for iosstylepicker. 'hours'
minutelabel the label to be displayed for minute picker. only for iosstylepicker. 'minutes'
minuteinterval steps interval while changing minute. accepts minuteinterval enum. minuteinterval.one
disableminute disables the minute picker. false
disablehour disables the hour picker. false
minhour selectable minimum hour. defaults to 1[12hr] or 0[24hr]
maxhour selectable maximum hour. defaults to 12[12hr] or 23[24hr]
minminute selectable minimum minute. 0
maxminute selectable maximum minute. 59
displayheader whether to display the sun moon animation. true
isonvaluechangemode weather to hide oktext, canceltext and return value on every onvaluechange. only for inline widget false
themedata themedata to use for the widget. theme.of(context)


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Top