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

Fix a fuzzy arrow warning #79

Merged
merged 1 commit into from
Oct 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.1

* Fix a fuzzy arrow type warning.

## 1.0.0

* **Breaking change**: The `allowTrailingOptions` argument to `new
Expand Down
13 changes: 11 additions & 2 deletions lib/src/arg_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,18 @@ class ArgParser {
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:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: args
version: 1.0.1-dev
version: 1.0.1
author: "Dart Team <[email protected]>"
homepage: https://github.com/dart-lang/args
description: >
Expand Down