date_picker_widget 0.0.3 copy "date_picker_widget: ^0.0.3" to clipboard
date_picker_widget: ^0.0.3 copied to clipboard

custom cupertino date picker widget.

date_picker_widget #

custom cupertino date picker widget. #

Installation #

Add date_picker_widget to your pubspec.yaml dependencies. And import it:

  date_picker_widget: ^0.0.3

How to use #

Simply create a CustomTimePicker widget, and pass the required params:

    CustomTimePicker(
            is24Hours: false,
            height: 200,
            width: size.width,
            initialDate: TimeOfDay.now(),
            onTimeSelected: (time) {
              print(time);
            },
          )

Params #

  final Function(TimeOfDay) onTimeSelected;
  final TimeOfDay initialDate;
  final double width;
  final double height;
  final bool is24Hours; // default is false
  final Decoration lineDecoration;
  final Decoration? decoration;
  final TextStyle textStyle;

Example #

class Screen2 extends StatelessWidget {
  const Screen2({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final size = MediaQuery.of(context).size;
    return Scaffold(
      body: Column(
        children: [
      Expanded(child: Container()),
      CustomTimePicker(
        is24Hours: false,
        height: 200,
        width: size.width,
        initialDate: TimeOfDay.now(),
        onTimeSelected: (time) {
          print(time);
        },
      )
        ],
      ),
    );
  }
}

Screenshots #

App Screenshot

Badges #

MIT License

2
likes
120
points
46
downloads

Publisher

unverified uploader

Weekly Downloads

custom cupertino date picker widget.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on date_picker_widget