render method

  1. @override
Widget render(
  1. BuildContext context,
  2. AntdPageIndicatorStyle style
)
override

Implementation

@override
Widget render(BuildContext context, AntdPageIndicatorStyle style) {
  var childList = <Widget>[];

  for (int i = 0; i < total; i++) {
    if (current == i) {
      childList.add(AntdBox(
        style: style.activeStyle,
      ));
    } else {
      childList.add(AntdBox(
        style: style.style,
      ));
    }
  }
  return !vertical
      ? Row(
          mainAxisSize: MainAxisSize.min,
          children: childList,
        )
      : Column(
          mainAxisSize: MainAxisSize.min,
          children: childList,
        );
}