【问题标题】:How to set the width and height of a Outlinebutton in Flutter?如何在 Flutter 中设置 Outlinebutton 的宽度和高度?
【发布时间】:2022-12-04 11:42:55
【问题描述】:

I am new in flutter, how to set width and height OutlineButton in Flutter, i have to try input width and height inside OutlineButton but got some errors. this is my code :

OutlinedButton(
  //width: AppSize.DIMEN_230,
  style: OutlinedButton.styleFrom(
    side: BorderSide(
      width: 2.0, color: Colors.black12,
    ),
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(10),
  ),),
  onPressed: () {
    showDatePicker(
        context: context,
        initialDate: DateTime.now(),
        firstDate: DateTime(1880),
        lastDate: DateTime(2050),
    );
  }, child: Text(\"YYYY/MM/DD HH:MM:SS\",
      style: textStyleW400S16.copyWith(
        fontStyle: FontStyle.italic,
        color: Colors.black54,
      ),
),
),

Is it correct? Is there another way to do it?

    标签: flutter dart


    【解决方案1】:
    猜你喜欢
    • 2018-10-21
    • 1970-01-01
    • 2015-04-24
    • 1970-01-01
    • 1970-01-01
    • 2011-08-20
    • 2017-12-26
    • 1970-01-01
    • 2020-09-25
    相关资源
    最近更新 更多