Skip to content

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Jun 22, 2017

No description provided.

@Hixie
Copy link
Contributor Author

Hixie commented Jun 23, 2017

cc @HansMuller for review

/// The following shows the code required to write a widget that fully conforms
/// to the [ImageProvider] and [Widget] protocols. (It is essentially a
/// bare-bones version of the [Image] widget.)
/// bare-bones version of the [widgets.Image] widget.)
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't realize that this worked. NICE

@Hixie
Copy link
Contributor Author

Hixie commented Jun 23, 2017

Landing this now but I must remember to check if that does indeed work...

@Hixie Hixie merged commit df1a01b into flutter:master Jun 23, 2017
@Hixie Hixie deleted the docs branch June 23, 2017 21:37
/// ```dart
/// new Image.asset('images/cat.png')
/// ```
///
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose this would be a good place to say that a 4x device would get the 3.5x cat, since that's the closest (or whatever our criteria actually is).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in new PR

/// Once code has been ported to use [CustomScrollView], other slivers, such as
/// [SliverGrid] or [SliverAppBar], can be put in the [CustomScrollView.slivers]
/// list.
///
Copy link
Contributor

Choose a reason for hiding this comment

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

This is really helpful. A little example that showed a ListView and the same CustomScrollVIew might be helpul too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, also done for grid.

}) : super(key: key, delegate: delegate);

/// Creates a sliver that places multiple box children in a two dimensional
/// arrangement with a fixed number of tiles in the cross axis.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be OK to say grid instead of "arrangement"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we try to avoid using the same words as in the name of the member being documented, because if someone is reading the docs, then the name has already failed them. :-)

///
/// Uses a [SliverGridDelegateWithFixedCrossAxisCount] as the [gridDelegate],
/// and a [SliverChildListDelegate] as the [delegate].
SliverGrid.count({
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be useful to say that the grid's main axis is the scrolling axis.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in the main GridView and SliverGrid class-level docs.

super(key: key, delegate: new SliverChildListDelegate(children));

/// Creates a sliver that places multiple box children in a two dimensional
/// arrangement with tiles that have a maximum cross-axis extent.
Copy link
Contributor

Choose a reason for hiding this comment

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

where the tiles' cumulative cross axis extent is [maxCrossAxisExtent]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't think that's accurate. the current text seems more correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added "each" to make that clearer.

@HansMuller
Copy link
Contributor

LGTM

@Hixie
Copy link
Contributor Author

Hixie commented Jun 23, 2017

Oops, I landed this before the LGTM. My bad. Will apply your fixes.

@Hixie Hixie mentioned this pull request Jun 23, 2017
@Hixie
Copy link
Contributor Author

Hixie commented Jun 23, 2017

-> #10953

Hixie added a commit to Hixie/flutter that referenced this pull request Jun 26, 2017
Applies comments I missed from flutter#10904.
Hixie added a commit that referenced this pull request Jun 26, 2017
Applies comments I missed from #10904.
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
Applies comments I missed from flutter#10904.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 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.

3 participants