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

OutlineButton documentation is very vague and unclear #37587

Closed
MichaelM97 opened this issue Aug 4, 2019 · 6 comments
Closed

OutlineButton documentation is very vague and unclear #37587

MichaelM97 opened this issue Aug 4, 2019 · 6 comments
Labels
a: first hour The first hour of using Flutter 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. P2 Important issues not at the top of the work list

Comments

@MichaelM97
Copy link

When creating an 'OutlineButton', I presume setting the 'color' tag should result in the button being filled with the specified color; but it doesn't.

Here's the button code

Container(
            alignment: Alignment.center,
            child: Padding(
              padding: EdgeInsets.only(bottom: 25.0),
              child: OutlineButton(
                color: Colors.red,
                child: Text(
                  'Log in',
                  style: TextStyle(color: Colors.blue),
                ),
                onPressed: () {
                  print("TODO");
                },
                borderSide: BorderSide(color: Colors.blue),
              ),
            ),
          ),

Here's the visual output

OutlineButton

@HansMuller HansMuller added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Aug 5, 2019
@HansMuller
Copy link
Contributor

OutlineButtons always have a transparent fill unless the button's highlightElevation is set to a value > 0. If that's the case then the outline button is filled with the specified color when pressed - before it's elevation is increased and its shadow appears.

The OutlineButton documentation is not clear on this, we need to fix that.

@Hixie Hixie added documentation d: api docs Issues with https://api.flutter.dev/ labels Jan 3, 2020
@Hixie Hixie added this to the Goals milestone Jan 3, 2020
@Hixie Hixie added the a: first hour The first hour of using Flutter label Jan 3, 2020
@Hixie Hixie changed the title OutlineButton 'color' tag doesn't work OutlineButton documentation is very vague and unclear Jan 3, 2020
@Hixie
Copy link
Contributor

Hixie commented Jan 3, 2020

The documentation for OutlineButton is actually really unclear on many aspects. It should have examples of basic usage, sample images showing cases with elevation, etc.

@jmagman jmagman added this to Awaiting triage in Tools - installer / upgrade review Jan 10, 2020
@jmagman jmagman removed this from Awaiting triage in Tools - installer / upgrade review Jan 10, 2020
@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label May 29, 2020
@Hixie Hixie removed this from the None. milestone Aug 17, 2020
@hello-addweb
Copy link

hello-addweb commented Nov 26, 2020

Try this

DecoratedBox(

        decoration:
        ShapeDecoration(shape: CircleBorder(), color: Colors.pinkAccent),
        child: Theme(
        data: Theme.of(context).copyWith(
        buttonTheme: ButtonTheme.of(context).copyWith(
        materialTapTargetSize: MaterialTapTargetSize.shrinkWrap)),
        child: OutlineButton(
        shape: CircleBorder(),
        child: Text('A'),
        onPressed: () => {},

),),);

@Abhishek01039
Copy link
Contributor

Hello @Hixie
OutlineButton is obsolete.
should we close this issue now or have to update the docs?

@HansMuller
Copy link
Contributor

HansMuller commented Feb 8, 2021

I'm closing this issue because the OutlineButton widget is deprecated and has been replaced by OutlinedButton. The new OutlinedButton widget does need examples, as do TextButton and ElevatedButton. Many examples can be found in flutter.dev/go/material-button-migration-guide and in #59702 as well as the ButtonStyle API doc.

I've opened an issue for the API doc lacunae - #75642

@github-actions
Copy link

github-actions bot commented Aug 6, 2021

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 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: first hour The first hour of using Flutter 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. P2 Important issues not at the top of the work list
Projects
None yet
Development

No branches or pull requests

7 participants