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

IntroSlider Background image or make it Transparent ?? #28

Closed pascalf22 closed 5 years ago

pascalf22 commented 5 years ago

Hello !

I want to have the same background to all Slide. But i dont want to add backgroundImage to all slide... because it's the same...

so here what i try :

I put the IntroSlider into a Container with a background image. I set the backgroundColor: Colors.transparent, for all slide.

But i dont see my backgroundimage... Maybe the IntroSlider has a default color... gray... because the background is a ligh gray.

[> Container(

          //color: Colors.white,
          decoration: BoxDecoration(
              image: DecorationImage(
                  image: AssetImage("assets/img/gb.png"),
                  fit: BoxFit.cover)),
          child: IntroSlider(
            slides: this.slides,
            onDonePress: this.onDonePress,
          ),
        )](url)

if i remove the IntroSlider(...) i see my image background

How can i do it ?

Thanks a lot !

Pascal

duytq94 commented 5 years ago

Hi @pascalf22 I add an attribute to set background color for all slides (and the default now is transparent). Please check 2a59f44e1f3d5a0d0c6cfd45155f1686618cabe7.

pascalf22 commented 5 years ago

Hello @duytq94 !! That's perfect !!! That's wonderfull! Good job :)

Thanks a lot !!! Have a wondeful day :)