Skip to content

Use @required for onPressed and onChanged - #4534

Merged
abarth merged 1 commit into
flutter:masterfrom
abarth:callback_required
Jun 12, 2016
Merged

abarth merged 1 commit into
flutter:masterfrom
abarth:callback_required

Conversation

@abarth

@abarth abarth commented Jun 12, 2016

Copy link
Copy Markdown
Contributor

We now use the @required annotation to encourage developers to
explicitly set onPressed and onChanged callbacks to null when that would
disable the widget.

Fixes #287

We now use the `@required` annotation to encourage developers to
explicitly set onPressed and onChanged callbacks to null when that would
disable the widget.

Fixes flutter#287
@abarth

abarth commented Jun 12, 2016

Copy link
Copy Markdown
Contributor Author

@Hixie @pq

@pq

pq commented Jun 12, 2016

Copy link
Copy Markdown
Contributor

LGTM from my end but will defer to @Hixie on semantics...

@Hixie

Hixie commented Jun 12, 2016

Copy link
Copy Markdown
Contributor

LGTM

@abarth
abarth merged commit 1a3adae into flutter:master Jun 12, 2016
@abarth
abarth deleted the callback_required branch June 12, 2016 20:25
cdotstout pushed a commit to cdotstout/flutter that referenced this pull request Apr 3, 2018
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 15, 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.

Disabling a button is non-obvious

3 participants