Skip to content

Parameters shadow properties in dartdocs (lots of broken links in Flutter docs as a result) #1486

Open
@Hixie

Description

@Hixie

The Opacity constructor looks like this:

  /// Creates a widget that makes its child partially transparent.                                                                                                                                                                                                  
  ///                                                                                                                                                                                                                                                               
  /// The [opacity] argument must not be null and must be between 0.0 and 1.0                                                                                                                                                                                       
  /// (inclusive).                                                                                                                                                                                                                                                  
  const Opacity({                                                                                                                                                                                                                                                   
    Key key,                                                                                                                                                                                                                                                        
    @required this.opacity,                                                                                                                                                                                                                                         
    Widget child,                                                                                                                                                                                                                                                   
  }) : assert(opacity != null && opacity >= 0.0 && opacity <= 1.0),                                                                                                                                                                                                 
       super(key: key, child: child);

   /// ...
   final double opacity;                                                                                                                                                                                                                                             

Our goal in writing this was that the constructor docs would link to the opacity field's page. Instead, it doesn't link anywhere.

It would be much nicer if arguments were not considered "in scope" for [...] links, since they don't actually have their own page to link to, so it doesn't really do any good to link to them.

Technically in the Flutter docs this manifests as "Broken links, widespread", but I guess it's really a mistake on our part (we didn't understand that arguments would be considered "in scope" and would thus prevent the links from working) so it's also "Enhancements considered important but without significant data indicating they are a big win" and I've marked it P2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work oncustomer-flutterIssues originating from important to Fluttertype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions