跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • dart 怎么重写类
未分類
17 9 月 2020

dart 怎么重写类

dart 怎么重写类

資深大佬 : TomVista 1

像下面的这个,我重写了 Column,改动其实就’extends CustomFlex’,但是我要建一个全参数的生成器.super 也要写全

有其他写法吗?

class CustomColumn extends CustomFlex {   final List<int> renderLevel;   CustomColumn({     this.renderLevel,     Key key,     MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,     MainAxisSize mainAxisSize = MainAxisSize.max,     CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,     TextDirection textDirection,     VerticalDirection verticalDirection = VerticalDirection.down,     TextBaseline textBaseline,     List<Widget> children = const <Widget>[],   }) : super(           renderLevel: renderLevel,           children: children,           key: key,           direction: Axis.vertical,           mainAxisAlignment: mainAxisAlignment,           mainAxisSize: mainAxisSize,           crossAxisAlignment: crossAxisAlignment,           textDirection: textDirection,           verticalDirection: verticalDirection,           textBaseline: textBaseline,         ); } 

大佬有話說 (0)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具