Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set pageColor not working #17

Closed
frankenten13 opened this issue Mar 4, 2020 · 3 comments
Closed

Set pageColor not working #17

frankenten13 opened this issue Mar 4, 2020 · 3 comments

Comments

@frankenten13
Copy link

Hi, i try add pageColor: Colors.transparent but not working, can you fix it. Thanks

@Pyozer
Copy link
Owner

Pyozer commented Mar 5, 2020

Hi, I tried using the example code of this package and it works fine.
I defined a color in the canvasColor property of the theme of my MaterialApp, and I defined pageColor with Colors.transparent (or even just removed the pageColor property), and it works.

Can you show me your code?

@frankenten13
Copy link
Author

I put my backgournd image in Stack, but not working, can you help me.

const pageDecoration = const PageDecoration(
      titleTextStyle: TextStyle(fontSize: 28.0, fontWeight: FontWeight.w700),
      bodyTextStyle: bodyStyle,
      descriptionPadding: EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 16.0),
      pageColor: Colors.transparent,
      imagePadding: EdgeInsets.zero,
    );
return Stack(
      children: <Widget>[
        Container(
          child: _buildImage('img1'), <-- My Background
        ),
        IntroductionScreen(
          key: introKey,
          pages: [
            PageViewModel(
              title: "Fractional shares",
              body:
              "Instead of having to buy an entire share, invest any amount you want.",
              image: _buildImage('img1'),
              decoration: pageDecoration,
            ),
           PageViewModel(),
           PageViewModel(),
          ....

@Pyozer
Copy link
Owner

Pyozer commented Mar 28, 2021

Hello @frankenten13, sorry I've just seen your reply.. 1year later :/
I hope you find the solution ^^
On my first reply I forgot that there is a param globalBackgroundColor. By settings Colors.transparent you will have a full transparent IntroductionScreen, so you can set an image as background, like your previous code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants