marcglasberg / back_button_interceptor

Flutter Package: May be used to intercept the Android back-button, as an alternative to `WillPopScope`.
BSD 2-Clause "Simplified" License
105 stars 21 forks source link

Avoid positional boolean parameters #10

Closed dernoun closed 2 years ago

dernoun commented 3 years ago

This is best practices from the official documentation.

AVOID positional boolean parameters.

Positional boolean parameters are a bad practice because they are very ambiguous. Using named boolean parameters is much more readable because it inherently describes what the boolean value represents.

marcglasberg commented 2 years ago

@dernoun You are right. But at this point this would be a massive breaking change. Everyone using this lib would have to fix it, so I have decided not to do it. Thanks for the good idea, anyway.