MarcelGarus / marquee

A Flutter widget that scrolls text infinitely. Provides many customizations including custom scroll directions and velocities, pausing after every round and specifying custom durations and curves for accelerating and decelerating.
MIT License
284 stars 135 forks source link

velocity value would not be Effective right now #65

Open githubkind opened 3 years ago

githubkind commented 3 years ago

i try to wacth the value if velocity by provider, when the velocity value change the speed will be effective always need the text play one times

 Selector<AllOne,Tuple5<String ,int,double,double,double >>(
                      shouldRebuild: (pre,next){
                        return pre!=next;
                      },
                      builder: (context, Tuple4Value, child) {
                        print('builderpriview${ Tuple4Value.item4}');
                        return  Marquee(
                          text:Tuple4Value.item1,
                          style: TextStyle(
                              color: GlobalConfig.colorList[Tuple4Value.item2], // fontSize: allone.currentFontSize,
                              letterSpacing: Tuple4Value.item5, fontSize: Tuple4Value.item3),
                          scrollAxis: Axis.horizontal,
                          velocity: Tuple4Value.item4,
                        );
                      }, selector: (context, setC)=>Tuple5(setC.displaytext,setC.textColorIndex,setC.fontsizeValue,setC.textSpeed,setC.letterSpacing)),

Thank you for your time