-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Discovered while implementing #128264 in this comment.
Perhaps we could add methods similar to these ones from FlutterCommand
:
flutter/packages/flutter_tools/lib/src/runner/flutter_command.dart
Lines 1640 to 1665 in cd18c8c
bool boolArg(String name, {bool global = false}) { | |
if (global) { | |
return globalResults![name] as bool; | |
} | |
return argResults![name] as bool; | |
} | |
/// Gets the parsed command-line option named [name] as a `String`. | |
/// | |
/// If no option named [name] was added to the [ArgParser], an [ArgumentError] | |
/// will be thrown. | |
String? stringArg(String name, {bool global = false}) { | |
if (global) { | |
return globalResults![name] as String?; | |
} | |
return argResults![name] as String?; | |
} | |
/// Gets the parsed command-line option named [name] as `List<String>`. | |
List<String> stringsArg(String name, {bool global = false}) { | |
if (global) { | |
return globalResults![name] as List<String>; | |
} | |
return argResults![name] as List<String>; | |
} | |
} |
gnprice
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team