1

This is a Sliver AppBar.

AppBar

How can I change the color of the back arrow ?

BUT I don't want to set leading: Icon(Icons.arrow_back, color: Colors.red) since (I believe) that the Sliver AppBar has the nice property of adapting the lead icon depending on context.

1 Answer 1

3

wrap the SliverAppBar widget with Theme widget, and change primaryIconTheme color in ThemeData. Here's the code:

 Theme( data: ThemeData( primaryIconTheme: IconThemeData(color: Colors.red)), child: SliverAppBar(), ), 
Sign up to request clarification or add additional context in comments.

1 Comment

Will test it later and if it works, will let you know + accept answer. Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.