When providing a closure that accepts parameters for which you don't need to provide a value, it is recommended that you use the underscore/underbar character (_). For example, when creating routes in MaterialApp, you specify a context. Don't do this:
routes: {
'/', (context) => SomeWidget(),
'/route2': (context) => Widget2(),
}
Do:
routes: {
'/', (_) => SomeWidget(),
'/route2': (_) => Widget2(),
}
When providing a closure that accepts parameters for which you don't need to provide a value, it is recommended that you use the underscore/underbar character (_). For example, when creating routes in MaterialApp, you specify a context. Don't do this:
Do: