Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
268656a8
Unverified
Commit
268656a8
authored
Dec 04, 2020
by
Hans Muller
Committed by
GitHub
Dec 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated GridView API Doc (#71611)
parent
4300226a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
22 deletions
+31
-22
scroll_view.dart
packages/flutter/lib/src/widgets/scroll_view.dart
+31
-22
No files found.
packages/flutter/lib/src/widgets/scroll_view.dart
View file @
268656a8
...
@@ -1513,28 +1513,6 @@ class ListView extends BoxScrollView {
...
@@ -1513,28 +1513,6 @@ class ListView extends BoxScrollView {
/// [CustomScrollView.slivers] property instead of the grid itself, and having
/// [CustomScrollView.slivers] property instead of the grid itself, and having
/// the [SliverGrid] instead be a child of the [SliverPadding].
/// the [SliverGrid] instead be a child of the [SliverPadding].
///
///
/// By default, [ListView] will automatically pad the list's scrollable
/// extremities to avoid partial obstructions indicated by [MediaQuery]'s
/// padding. To avoid this behavior, override with a zero [padding] property.
///
/// {@tool snippet}
/// The following example demonstrates how to override the default top padding
/// using [MediaQuery.removePadding].
///
/// ```dart
/// Widget myWidget(BuildContext context) {
/// return MediaQuery.removePadding(
/// context: context,
/// removeTop: true,
/// child: ListView.builder(
/// itemCount: 25,
/// itemBuilder: (BuildContext context, int index) => ListTile(title: Text('item $index')),
/// )
/// );
/// }
/// ```
/// {@end-tool}
///
/// Once code has been ported to use [CustomScrollView], other slivers, such as
/// Once code has been ported to use [CustomScrollView], other slivers, such as
/// [SliverList] or [SliverAppBar], can be put in the [CustomScrollView.slivers]
/// [SliverList] or [SliverAppBar], can be put in the [CustomScrollView.slivers]
/// list.
/// list.
...
@@ -1644,6 +1622,37 @@ class ListView extends BoxScrollView {
...
@@ -1644,6 +1622,37 @@ class ListView extends BoxScrollView {
/// ```
/// ```
/// {@end-tool}
/// {@end-tool}
///
///
/// By default, [GridView] will automatically pad the limits of the
/// grids's scrollable to avoid partial obstructions indicated by
/// [MediaQuery]'s padding. To avoid this behavior, override with a
/// zero [padding] property.
///
/// {@tool snippet}
/// The following example demonstrates how to override the default top padding
/// using [MediaQuery.removePadding].
///
/// ```dart
/// Widget myWidget(BuildContext context) {
/// return MediaQuery.removePadding(
/// context: context,
/// removeTop: true,
/// child: GridView.builder(
/// gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
/// crossAxisCount: 3,
/// ),
/// itemCount: 300,
/// itemBuilder: (BuildContext context, int index) {
/// return Card(
/// color: Colors.amber,
/// child: Center(child: Text('$index')),
/// );
/// }
/// ),
/// );
/// }
/// ```
/// {@end-tool}
///
/// See also:
/// See also:
///
///
/// * [SingleChildScrollView], which is a scrollable widget that has a single
/// * [SingleChildScrollView], which is a scrollable widget that has a single
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment