Skip to content

Reland Flutter tool support for dynamic code #20543 - #20646

Merged
sbaranov merged 2 commits into
flutter:masterfrom
sbaranov:flutter-dynamic-flag
Aug 16, 2018
Merged

sbaranov merged 2 commits into
flutter:masterfrom
sbaranov:flutter-dynamic-flag

Conversation

@sbaranov

Copy link
Copy Markdown
Contributor

No description provided.

@sbaranov
sbaranov requested a review from jonahwilliams August 15, 2018 20:46
@jonahwilliams
jonahwilliams requested review from cbracken and removed request for jonahwilliams August 15, 2018 20:48
@jonahwilliams

Copy link
Copy Markdown
Contributor

Adding @cbracken since I know very little about the mac builds

@sbaranov sbaranov changed the title Reland: Flutter tool support for dynamic code #20543 Reland Flutter tool support for dynamic code #20543 Aug 15, 2018

@cbracken cbracken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

throw new UsageException('Only one of --debug, --profile, or --release can be specified.', null);
final bool dynamicFlag = argParser.options.containsKey('dynamic')
? argResults['dynamic']
: false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just:

final bool dynamicFlag = argResults['dynamic'] ?? false;

since Map returns null when a key isn't present, and either way we'd never want dynamicFlag to be null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this isn't a regular map. It overrides [] and will throw if flag doesn't exist. So this is the patterns that's used everywhere for argResults.

@sbaranov
sbaranov merged commit 393f927 into flutter:master Aug 16, 2018
@sbaranov
sbaranov deleted the flutter-dynamic-flag branch August 16, 2018 15:43
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants