fluttercirculardatetimepicker 1.0.1 copy "fluttercirculardatetimepicker: ^1.0.1" to clipboard
fluttercirculardatetimepicker: ^1.0.1 copied to clipboard

A new Flutter package CircularDateTimePicker created by suryadevsingh.

Example/main.dart

import 'package:flutter/material.dart';
import 'package:fluttercirculardatetimepicker/fluttercirculardatetimepicker.dart';


void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
          primarySwatch: Colors.deepOrange,
      ),
      title: "CircularDateTimePicker Demo",
      home: DateTimePicker(),
    );
  }
}

class DateTimePicker extends StatefulWidget {
  @override
  _DateTimePickerState createState() => _DateTimePickerState();
}

class _DateTimePickerState extends State<DateTimePicker> {

  dynamic _dateTime = 'DOB: DD-YY-MM';

  @override
  Widget build(BuildContext context) {
    return  Scaffold(
      body: Center(
        child: CircularDateTimePicker(
          height: 50,
          date: _dateTime,
          textcolor: Colors.grey,
          bordercolor: Colors.grey,
          onPressed: () {
            showDatePicker(
              context: context,
              initialDate: DateTime(1999),
              firstDate: DateTime(2000),
              lastDate: DateTime(2019),
            ).then((date) {
              setState(() {
                _dateTime = date != null
                    ? '${date.day} - ${date.month} - ${date.year}'
                    : _dateTime;
              });
            });
          },
        ),
      ),
    );
  }
}
1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter package CircularDateTimePicker created by suryadevsingh.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on fluttercirculardatetimepicker