相关疑难解决方法(0)

如何自定义日期选择器

我正在使用该showDatePicker()方法在flutter应用程序中显示日期选择器。如何自定义日期选择器的颜色?

这是我主题的代码:

class CustomTheme extends Theme {
  /*
   * Colors:
   *    Primary Blue: #335C81 (51, 92, 129)
   *    Light Blue:   #74B3CE (116, 179, 206)
   *    Yellow:       #FCA311 (252, 163, 17)
   *    Red:          #E15554 (255, 85, 84)
   *    Green:        #3BB273 (59, 178, 115)
   */

  static int _fullAlpha = 255;
  static Color blueDark =  new Color.fromARGB(_fullAlpha, 51, 92, 129);
  static Color blueLight = new Color.fromARGB(_fullAlpha, 116, 179, 206);
  static Color yellow =    new Color.fromARGB(_fullAlpha, 252, 163, 17);
  static Color red …
Run Code Online (Sandbox Code Playgroud)

dart flutter

5
推荐指数
8
解决办法
8830
查看次数

标签 统计

dart ×1

flutter ×1