/**
Visibility 隱藏/可見;Offstate不能保存組件的狀態(tài)心肪,組件重新加載
const Visibility({
Key key,
@required this.child,
this.replacement = const SizedBox.shrink(), 不可見時(shí)顯示的組件(當(dāng)maintainState = false)
this.visible = true, 子組件是否可見挠蛉,默認(rèn)true(可見)
this.maintainState = false, 不可見時(shí)是否維持狀態(tài)传藏,默認(rèn)為false每次加載都重新創(chuàng)建
this.maintainAnimation = false, 不可見時(shí)寸宏,是否維持子組件中的動(dòng)畫
this.maintainSize = false, 不可見時(shí)是否留有空間(設(shè)置為true,會(huì)報(bào)錯(cuò)吼畏。如果想隱藏并保留組件空間請(qǐng)使用Opacity)
this.maintainSemantics = false,
this.maintainInteractivity = false, 不可見時(shí)是否具有交互性
})
*/
body: Visibility(
maintainState: true,
child: Text("Visibility組件"),
),