Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit f5fe77d

Browse files
committed
Fix a fuzzy arrow warning
Closes #78
1 parent 8377f3d commit f5fe77d

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.1
2+
3+
* Fix a fuzzy arrow type warning.
4+
15
## 1.0.0
26

37
* **Breaking change**: The `allowTrailingOptions` argument to `new

lib/src/arg_parser.dart

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,18 @@ class ArgParser {
8888
bool negatable: true,
8989
void callback(bool value),
9090
bool hide: false}) {
91-
_addOption(name, abbr, help, null, null, null, defaultsTo, callback,
91+
_addOption(
92+
name,
93+
abbr,
94+
help,
95+
null,
96+
null,
97+
null,
98+
defaultsTo,
99+
callback == null ? null : (value) => callback(value as bool),
92100
OptionType.FLAG,
93-
negatable: negatable, hide: hide);
101+
negatable: negatable,
102+
hide: hide);
94103
}
95104

96105
/// Defines a value-taking option. Throws an [ArgumentError] if:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: args
2-
version: 1.0.1-dev
2+
version: 1.0.1
33
author: "Dart Team <[email protected]>"
44
homepage: https://github.com/dart-lang/args
55
description: >

0 commit comments

Comments
 (0)