scrollingSimpleIndicatorBuilder static method

Widget scrollingSimpleIndicatorBuilder(
  1. BuildContext context,
  2. PageController controller,
  3. int pageCount, {
  4. Color? indicatorColor,
  5. Color? color,
  6. double? indicatorWidth,
  7. double? height,
  8. double? width,
  9. double? radius,
  10. bool isPaged = true,
  11. bool showDivider = false,
  12. double? verticalPadding,
  13. double? horizontalPadding,
})

Implementation

static Widget scrollingSimpleIndicatorBuilder(
    BuildContext context, PageController controller, int pageCount,
    {Color? indicatorColor,
    Color? color,
    double? indicatorWidth,
    double? height,
    double? width,
    double? radius,
    bool isPaged = true,
    bool showDivider = false,
    double? verticalPadding,
    double? horizontalPadding}) {
  final theme = hubbleThemeData(context);
  return Row(
    mainAxisAlignment: MainAxisAlignment.center,
    children: [
      if (showDivider) const Expanded(child: HubbleDivider()),
      ScrollingPageIndicator(
        isPaged: isPaged,
        controller: controller,
        itemCount: pageCount,
        indicatorWidth: indicatorWidth ?? 30.0.dp,
        indicatorColor: indicatorColor ?? theme.colors.brand.primary.medium,
        radius: radius ?? 8.0.dp,
        height: height ?? 8.0.dp,
        width: width ?? 150.0.dp,
        color: color ?? theme.colors.base.tertiary.medium,
      ).paddingSymmetric(
        horizontal: 16.0.dp,
      ),
      if (showDivider) const Expanded(child: HubbleDivider()),
    ],
  ).paddingSymmetric(
    vertical: verticalPadding ?? 10.0.dp,
    horizontal: horizontalPadding ?? 0.0.dp,
  );
}