Milad-Akarie / smooth_page_indicator

Flutter Smooth PageView indicators
MIT License
1.24k stars 147 forks source link

Wrong margin in AnimatedSmoothIndicator with ScaleEffect #61

Closed TheManuz closed 1 year ago

TheManuz commented 1 year ago

AnimatedSmoothIndicator with ScaleEffect has an additional margin on the right size, which causes a slight offset when wrapping the indicator in a Center widget.

These are the settings I'm using:

AnimatedSmoothIndicator(
    activeIndex: index,
    count: count,
    effect: ScaleEffect(
        activeDotColor: colorScheme.primary,
        dotColor: colorScheme.primaryContainer,
        spacing: 8,
        dotWidth: 8,
        dotHeight: 8,
    ),
),

This is the result with Show guidelines enabled: scale_effect_margin

The margin on the right shouldn't be there.

Milad-Akarie commented 1 year ago

@TheManuz Fixed in new version