duytq94 / flutter-intro-slider

Simple and configurable app introduction slider for Flutter
https://pub.dartlang.org/packages/intro_slider
MIT License
677 stars 141 forks source link

can't change inActive indicator dots colors #141

Closed heshesh2010 closed 1 year ago

heshesh2010 commented 1 year ago

Hi , I have set the colors for orange and black as my code shows , but I see only orange color is set on selected dot (active dot) and also inActive dots

                  indicatorConfig: IndicatorConfig(
                    activeIndicatorWidget: Container(
                      width: 10.0,
                      height: 10,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(4),
                        color: Colors.black,
                      ),
                    ),
                    indicatorWidget: Container(
                      width: 10.0,
                      height: 10,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(4),
                        color: AppColors().mainColor(1),
                      ),
                    ),
                    isShowIndicator: true,
                    spaceBetweenIndicator: 10.0,
                    typeIndicatorAnimation:
                        TypeIndicatorAnimation.sizeTransition,
                  ),

Screenshot 2023-08-29 at 1 12 29 AM

duytq94 commented 1 year ago

Hi, sorry for late replay, You are using TypeIndicatorAnimation.sizeTransition, which is generally understood as changing the size of the widget. In your case define both active and non-active indicators, so if the active is a circle and the non-active is a square, how does the animation look like, right? So this is the limitation I mentioned here: Screenshot 2023-09-09 at 10 34 09

duytq94 commented 1 year ago

I just updated (the latest version lib at this time ~ 4.2.1) to make it able to use colorActiveIndicator when using TypeIndicatorAnimation.sizeTransition (without using custom indicator case), like this

indicatorConfig: const IndicatorConfig(
  colorIndicator: Colors.orange,
  colorActiveIndicator: Colors.black,
  sizeIndicator: 13.0,
  typeIndicatorAnimation: TypeIndicatorAnimation.sizeTransition,
),

Simulator Screen Shot - iPhone 13 - 2023-09-09 at 13 09 04

Hoping can help.