【问题标题】:How to make a fullscreen Date picker in Flutter如何在 Flutter 中制作全屏日期选择器
【发布时间】:2023-02-07 02:54:39
【问题描述】:

我正在为小型 Android 设备开发应用程序,我想全屏显示日期选择器,以便按钮占用尽可能多的空间。

已经试过Size of the Date Picker in Flutter的答案 像这样:

showDatePicker(
        context: context,
        initialDate: DateTime.now(),
        firstDate: DateTime(2000),
        lastDate: DateTime(2025),
        builder: (context, child) {
          return Column(
            children: <Widget>[
              SizedBox(
                height: MediaQuery.of(context).size.height,
                width: MediaQuery.of(context).size.width,
                child: child,
              ),
            ],
          );
        });

但该解决方案似乎只能使其变小。

注意:另外,如果您可以推荐一个日期选择器包,那就太好了!

【问题讨论】:

    标签: flutter


    【解决方案1】:

    检查这个包 -> syncfusion_flutter_datepicker

    链接:https://pub.dev/packages/syncfusion_flutter_datepicker

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-05
      • 1970-01-01
      • 2021-03-19
      • 1970-01-01
      • 2016-11-05
      • 1970-01-01
      • 2022-01-22
      • 1970-01-01
      相关资源
      最近更新 更多