flutter ui整改学习
文字设置边距
文字本身样式是没有边界设置的因此我们得加上一个container
EdegeInset的使用规范
const EdgeInsets.only(left: 8.0)
Container(
child: new Text(
"hello nihaoya come on",
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontWeight: FontWeight.bold),
),
color: Colors.red,
margin: const EdgeInsets.all(100.0),
),
元素显示判断将_active中的值赋值给container的属性active
Container(
child: TapboxB(//子元素是b
active: _active,
onChanged: _handleTapboxChanged,
),
);