Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example in FlatButton, RaisedButton, etc that shows setting the text of the button #12382

Closed
sethladd opened this issue Oct 3, 2017 · 4 comments · Fixed by #27169
Closed
Labels
d: api docs Issues with https://api.flutter.dev/ f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Comments

@sethladd
Copy link
Contributor

sethladd commented Oct 3, 2017

I checked the FlatButton and I couldn't find the simple of example of "a button with text". There isn't an obvious "declare the text of the button here". I assume it's the child widget?

https://docs.flutter.io/flutter/material/FlatButton-class.html

It would be sufficient, IMO, to show a simple example snippet in the top of the docs.

@sethladd sethladd added the d: api docs Issues with https://api.flutter.dev/ label Oct 3, 2017
@sethladd
Copy link
Contributor Author

sethladd commented Oct 3, 2017

cc @Hixie

@Hixie Hixie added this to the 4: Next milestone milestone Oct 3, 2017
@Hixie Hixie changed the title Doc Request: example in Button docs that shows setting the text of the button Add example in FlatButton, RaisedButton, etc that shows setting the text of the button Oct 3, 2017
@edutrul
Copy link

edutrul commented May 23, 2018

I agree!
for instance here's a piece of code to update in documentation

new RaisedButton(
  child: new Text('Play!'),
  color: Colors.blueAccent,
),

@Hixie
Copy link
Contributor

Hixie commented May 23, 2018

Yeah we should add sample code and screen shots to those API docs.

@zoechi zoechi added the framework flutter/packages/flutter repository. See also f: labels. label Dec 4, 2018
@goderbauer goderbauer added the f: material design flutter/packages/flutter/material repository. label Dec 28, 2018
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
d: api docs Issues with https://api.flutter.dev/ f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
Widget Documentation
Awaiting triage
Development

Successfully merging a pull request may close this issue.

5 participants