YAppBarWidget function
导航条组件
Implementation
Stack YAppBarWidget({String? title, Widget? leftWidget, Function()? onLeftClick, Widget? rightWidget, Function()? onRightClick, Widget? leftContainer, Widget? rightContainer, Widget? centerContainer}) {
return Stack(children: <Widget>[
Row(children: <Widget>[
leftContainer ?? SizedBox(width: yNavBarHeight(), height: yNavBarHeight(), child: _YFlatButton(leftWidget, onClick: () => onLeftClick!())),
Expanded(child: Container()),
rightContainer ?? SizedBox(width: yNavBarHeight(), height: yNavBarHeight(), child: _YFlatButton(rightWidget, onClick: () => onRightClick!())),
]),
Row(children: <Widget>[centerContainer == null ? YTitleWidget(title) : Expanded(child: Center(child: centerContainer))]),
]);
}