1

I've a simple sliver app bar, and i set my primary color to this:

 theme: ThemeData(primary Color: Color. fromRGBO(50, 50, 205, 1)),

Before i added the sliver app bar all the screen was set to primary color, But after i added the sliver app bar suddenly the screen turn to white.

How do I set my primary color to fill the screen?

it's a really simple sliver app bar, if you need the code for this let me know

Mangaldeep Pannu
  • 3,738
  • 2
  • 26
  • 45
Michael
  • 583
  • 4
  • 13

2 Answers2

0

Still Don't know why this is happening, but i found a solution.

Just wrap your remaining screen with container and add color like this:

   SliverFillRemaining(
              child: Container(
                color: Color.fromRGBO(30, 30, 123, 1.0),
                child: ...your remaining screen
Michael
  • 583
  • 4
  • 13
0

Maybe you need to use a Scaffold widget and inside it place the SliverAppBar and use the backgroundcolor property of Scaffold to set the color screen.

Hairon Chaviano
  • 435
  • 2
  • 5