(12)、Study Flutter Container Widget組件學(xué)習(xí)補(bǔ)充

body: Container(
          ///設(shè)置容器中child對齊方式
          alignment: Alignment.bottomCenter,

          ///設(shè)置容器中child的padding值
          padding: EdgeInsets.all(20),

          ///設(shè)置容器背景顏色。如果foregroundDecoration設(shè)置的話,可能會遮蓋color效果。與decoration屬性中的color沖突。
          //color: Colors.amberAccent,

          ///繪制在child前面的裝飾。
          foregroundDecoration: BoxDecoration(color: Color.fromARGB(20, 156, 212, 80)),

          ///指定容器的寬度
          width: 200,

          ///指定容器的高度
          height: 300,

          ///設(shè)置容器中child額外的約束條件,double.infinity:強(qiáng)制鋪滿屏幕
          constraints: BoxConstraints(minWidth: double.infinity),

          ///給容器設(shè)置裝飾
          decoration: BoxDecoration(
              shape: BoxShape.rectangle, color: Colors.deepOrangeAccent),

          ///設(shè)置容器的邊距
          margin: EdgeInsets.all(30),

          ///給容器設(shè)置變換矩陣()
          transform: Matrix4.rotationZ(0.1),

          ///給容器設(shè)置子widget
          child: Text(title),
        ),

關(guān)于Flutter Matrix4矩陣變換參考文章:http://www.itdecent.cn/p/cc2f9a088fc9

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容