In my Polymer Dart 1.0.0 study, which I found for events and observation methods, I am forced to use this pattern
@reflectable
void someEvent([_, __]) {
...
}
or by observer
@Observe('someField')
void someFieldChanged([_, __]) {
...
}
I understand why square brackets are needed, additional parameters, I also understand that if you do not care about the parameters passed, you can represent this parameter with an underscore. I was struck by the examples, which I considered as a double underscore __, as the second character between the square brackets. When I again tried to use only one underscore, I get a duplicate of the formal parameter error. Is there a reason why the second parameter that you do not need should be different from the first? By this logic, if I include the third, does this mean that it should be a triple underline ___?
Thanks.
source
share