Member-only story
Drawer And List Tile Themes Go Together
One of the features of Drawers in Flutter is that you can use ListTiles to form general purpose navigation drawers and more focused app screen info-badged-drawers. But there are some theme tricks required to bring the ful power of the drawer and list tile themes working together. Let me show you how.
A Drawer Theme
A Drawer Theme sets allows us to override this Drawer Default properties[That means that if nothing is set in Themes than the Drawer class will set up some default values of these properties]:
1. backgroundColor
2. scrimColor, that is the outer edge color of the drawer AND in the modal drawer use-case the background color of the barrier obscuring the content screen.
3. elavation, normally we do not add a design twist to this to deviate from the Material Design 3 spec and leave with the default MD3 spec values.
4. shape, this is something you can design twist from the MD3 default spec shape.
5. width, normally we set this to the default MD3 spec width value.
To highlight again, in Flutter We have a Flutter Theme Override Hierarchy:
1. Theme
2. ThemeData