I recently found out it was possible to include final
in function parameters.
/// Handler for the footer leading checkbox
void _onCheck(final bool value) {
setState(() {
_checked = value;
});
}
However, this feature is not documented anywhere and it's impossible to search any information regarding this topic.
Since the value being passed to the function was already declared elsewhere and could've used var
, what are the impacts of using final
in function parameters?