flutter Row

2019-12-30  本文已影响0人  学学学q
MainAxisAlignment.spaceEvenly MainAxisAlignment.spaceAround MainAxisAlignment.spaceBetween
 Row(
        mainAxisAlignment: MainAxisAlignment.center,
        textDirection: TextDirection.rtl,
        children: <Widget>[
          Container(
            width: 100,
            height: 100,
            color: Colors.red,
            alignment: Alignment.center,
            child: Text("A", style: TextStyle(fontSize: 24, color: Colors.white), textDirection: TextDirection.ltr,),
          ),
          Container(
            width: 100,
            height: 100,
            color: Colors.yellow,
            alignment: Alignment.center,
            child: Text("B", style: TextStyle(fontSize: 24, color: Colors.white), textDirection: TextDirection.ltr,),
          ),
          Container(
            width: 100,
            height: 100,
            color: Colors.green,
            alignment: Alignment.center,
            child: Text("C", style: TextStyle(fontSize: 24, color: Colors.white), textDirection: TextDirection.ltr,),
          ),
        ],
      ),
上一篇 下一篇

猜你喜欢

热点阅读