build method
Implementation
@override
Widget build(BuildContext context, SwiperPluginConfig config) {
ThemeData themeData = Theme.of(context);
Color activeColor = this.activeColor ?? themeData.primaryColor;
Color color = this.color ?? themeData.scaffoldBackgroundColor;
if (Axis.vertical == config.scrollDirection) {
return new Column(
key: key,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Text(
"${config.activeIndex + 1}",
style: TextStyle(color: activeColor, fontSize: activeFontSize),
),
new Text(
"/",
style: TextStyle(color: color, fontSize: fontSize),
),
new Text(
"${config.itemCount}",
style: TextStyle(color: color, fontSize: fontSize),
)
],
);
} else {
return new Row(
key: key,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Text(
"${config.activeIndex + 1}",
style: TextStyle(color: activeColor, fontSize: activeFontSize),
),
new Text(
" / ${config.itemCount}",
style: TextStyle(color: color, fontSize: fontSize),
)
],
);
}
}