Fix a fuzzy arrow warning (#79)
Closes #78
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d893d5c..13b020d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.0.1
+
+* Fix a fuzzy arrow type warning.
+
## 1.0.0
* **Breaking change**: The `allowTrailingOptions` argument to `new
diff --git a/lib/src/arg_parser.dart b/lib/src/arg_parser.dart
index fd6cb9a..62c8276 100644
--- a/lib/src/arg_parser.dart
+++ b/lib/src/arg_parser.dart
@@ -88,9 +88,18 @@
bool negatable: true,
void callback(bool value),
bool hide: false}) {
- _addOption(name, abbr, help, null, null, null, defaultsTo, callback,
+ _addOption(
+ name,
+ abbr,
+ help,
+ null,
+ null,
+ null,
+ defaultsTo,
+ callback == null ? null : (value) => callback(value as bool),
OptionType.FLAG,
- negatable: negatable, hide: hide);
+ negatable: negatable,
+ hide: hide);
}
/// Defines a value-taking option. Throws an [ArgumentError] if:
diff --git a/pubspec.yaml b/pubspec.yaml
index f5ead67..00fc576 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: args
-version: 1.0.1-dev
+version: 1.0.1
author: "Dart Team <misc@dartlang.org>"
homepage: https://github.com/dart-lang/args
description: >