myVTab static method
Implementation
static Tab myVTab(String title, bool isCurrent, BuildContext context,
{Color indicatorColor = UIData.primaryColor,
Color titleNColor = UIData.black,
num indicatorH = 100,
num indicatorW = 8}) {
var isZhg = true;
var textWidget = Text(
title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.0,
color: isZhg && isCurrent
? UIData.pureWhite
: isCurrent
? indicatorColor
: titleNColor),
);
return Tab(
child: Stack(
children: [
!isCurrent
? SizedBox()
: Row(
children: [
Expanded(
child: MyAssetImageView(
'ic_shop_cate_zhg_bg.png',
width: 86.hsp,
fit: BoxFit.fill,
)
.box
.color(Colors.transparent)
.padding(EdgeInsets.fromLTRB(2.0, .0, 2.0, 0.0))
.make())
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
isZhg && isCurrent
? SizedBox()
: Container(
margin: EdgeInsets.fromLTRB(0.0, 0.0, 8.0, 0.0),
decoration: isCurrent
? BoxDecoration(color: indicatorColor)
: null,
width: indicatorW.toDouble(),
height: indicatorH.toDouble(),
),
Expanded(
child: Container(
child: isZhg ? textWidget.centered() : textWidget,
)),
],
)
],
).box.height(isZhg && isCurrent ? 48.vsp : double.infinity).make(),
);
}