Closed
Description
The implementation of addFlag
in lib/src/arg_parser.dart
relies on the deprecated fuzzy arrow feature to allow the passing of a callback of type bool -> void
where a callback of type dynamic -> void
is expected (in the call to _addOption
). Nothing in the latter contract prevents calling the callback with something that is not a bool.
This code should be updated. Since the eventual all of the callback is done dynamically anyway, it might be most appropriate to simply change the type of the callback in the _addOption function to either Function
, or Null -> void
.
More context here.