1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] How to change color of the selected NavigationRailDestination?

Discussão em 'Mobile' iniciado por Stack, Outubro 25, 2024 às 11:52.

  1. Stack

    Stack Membro Participativo

    A navigation rail can be created easily using the below code:

    NavigationRail(
    extended: true,
    backgroundColor: Colors.blue,
    destinations: [
    NavigationRailDestination(
    icon: Icon(...),
    label: Text('Dashboard'),
    ),
    ],
    ),


    The above code will make the entire navigation rail blue so how to change the color of the selected navigation rail to white? Unselected ones remain blue and only the selected one gets changed to a different color.

    Here is a dribbble design, I want to do something like this:

    [​IMG]

    Continue reading...

Compartilhe esta Página