title: How to set static gradient background for PageView in Flutter?
body: <p>Currently I have a PageView set up with 3 pages, scrollable from top to bottom, all with the same background gradient, yet with every page change I'm scrolling away the gradient. As you can imagine it looks somewhat unasthetic to see the beginning and end of the gradient while scrolling. I'd like it to stay put and not move.
  That's where I'm lost.</p>
  
  <p>I tried removing the gradient container from each page and put it into a positioned widget in the class that's being rendered, as shown below.
  I tried simply returning a Container(being the gradient of my choice - "Background(null)"), and returning intropageview as a child of it.</p>
  
  <pre><code>class TestGenderSelection extends StatefulWidget {
    _TestGenderSelection createState() =&gt; _TestGenderSelection();
  }
  
  class _TestGenderSelection extends State&lt;TestGenderSelection&gt; {
    var account  = Account();
    @override
    Widget build(BuildContext context) {
      return Material(
        child: Scaffold(
          backgroundColor: Colors.transparent,
          body: Stack(
              children: &lt;Widget&gt;[
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: &lt;Widget&gt;[
                    Padding(
                      padding: const EdgeInsets.only(top: 50.0,left: 20.0),
                      child: SvgPicture.asset(
                          "assets/images/rocker.svg",
                          width: 70,
                          height: 70,
                          alignment: Alignment.topLeft),
                    ),
                    Padding(
                      padding: EdgeInsets.only(top: 20.0,left: 20.0),
                      child: Text(
                        "May I Assume your gender?\nYou tell me.",
                        style: TextStyle(
                            fontSize: 25,
                            fontFamily: "IntroBlackCaps",
                            fontWeight: FontWeight.w300,
                            color: Colors.white
                        ),
                      ),
                    ),
                    Padding(
                      padding: const EdgeInsets.only(top: 250.0),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: &lt;Widget&gt;[
                          InkWell(onTap: () { BamRemote.goToHome(context);print(account.username);},child: SvgPicture.asset("assets/images/baby-boy.svg",width: 150, height: 150,)),
                          InkWell(onTap: () =&gt; BamRemote.goToHome(context),child: SvgPicture.asset("assets/images/baby-girl.svg",width: 150, height: 150,)),
                          InkWell(onTap: () =&gt; BamRemote.goToHome(context),child: SvgPicture.asset("assets/images/newborn.svg",width: 150, height: 150,))
                        ],),
                    )
  
  
                  ],
                ),
                Column(
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: &lt;Widget&gt;[
                      Padding(
                          padding: const EdgeInsets.only(right: 20.0, bottom: 20.0),
                          child: Align(
                              alignment: Alignment.bottomRight,
                              child: InkWell(
                                onTap: () =&gt; introcontroller.previousPage(duration: Duration(milliseconds: 900), curve: Curves.linearToEaseOut),
                                child: RotatedBox(
                                    quarterTurns: 1,
                                    child: Icon(Icons.arrow_back_ios,color: Colors.white,size: 25.0,)),
                              ))),
  
                      Padding(
                          padding: const EdgeInsets.only(right: 20.0, bottom: 20.0),
                          child: Align(
                              alignment: Alignment.bottomRight,
                              child: InkWell(
                                onTap: () =&gt; introcontroller.nextPage(duration: Duration(milliseconds: 900), curve: Curves.linearToEaseOut),
                                child: RotatedBox(
                                    quarterTurns: 3,
                                    child: Icon(Icons.arrow_back_ios,color: Colors.white,size: 25.0)),
                              )))]),
  
              ]),
        ),
      );
    }
  
  }
  
  final intropageview = PageView(
    scrollDirection: Axis.vertical,
    controller: introcontroller,
    children: &lt;Widget&gt;[
      TestSplashScreen(),
      TestNameSelection(),
      TestGenderSelection(),
      //TestThemeSelection(),
    ],
  );
  
  class Intro extends StatelessWidget{
    @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return Stack(
        children: &lt;Widget&gt;[
          Positioned(
            top: 0.0,
            child: Background(null)
          ),
          intropageview,
        ],
      );
  
  
    }
  
  }
  </code></pre>
  
  <p>I'm not getting any error messages. It simply renders the background black, as its the primary color in my theme, i'm guessing.</p>