Q:

Undefined class datetime in flutter

I´m trying to create a datetime select in flutter. I have the frontend but I need to create function to show date time selector. I follow this video but i don´t know why return 

Undefined Class 'Datetime'`

  DateTime date = new DateTime.now();

  Future<Null> selectDate(BuildContext context) async {
    final Datetime picked = await showDatePicker(
        context: context,
        initialDate: date,
        firstDate: new DateTime(2010),
        lastDate: null);
    if (picked != null && picked != date) {
      print('date selected: ${date.toString()}');
      setState(() {
        date = picked;
      });
    }
  }

So anybody has idea what is wrong?

A:

You have a typo declaring your picked variable - should be DateTime with a capital T.

