GitHub

    Table of contents

  1. 示例
  2. 相关链接

DatePicker

Edit this page

Shows a dialog containing a material design date picker.

示例

Future<DateTime> selectedDate = showDatePicker(
  context: context,
  initialDate: DateTime.now(),
  firstDate: DateTime(2018),
  lastDate: DateTime(2030),
  builder: (BuildContext context, Widget child) {
    return Theme(
      data: ThemeData.dark(),
      child: child,
    );
  },
);

相关链接