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
49e50762
Unverified
Commit
49e50762
authored
Dec 11, 2020
by
Mitesh Singh
Committed by
GitHub
Dec 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AdoptAWidget: PageView (#71174)
parent
770a9b25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
page_view.dart
packages/flutter/lib/src/widgets/page_view.dart
+29
-0
No files found.
packages/flutter/lib/src/widgets/page_view.dart
View file @
49e50762
...
...
@@ -575,6 +575,35 @@ const PageScrollPhysics _kPagePhysics = PageScrollPhysics();
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=J1gE9xvph-A}
///
/// {@tool dartpad --template=stateless_widget_scaffold}
///
/// Here is an example of [PageView]. It creates a centered [Text] in each of the three pages
/// which scroll horizontally.
///
/// ```dart
/// Widget build(BuildContext context) {
/// final controller = PageController(initialPage: 0);
/// return PageView(
/// /// [PageView.scrollDirection] defaults to [Axis.horizontal].
/// /// Use [Axis.vertical] to scroll vertically.
/// scrollDirection: Axis.horizontal,
/// controller: controller,
/// children: [
/// Center(
/// child: Text("First Page"),
/// ),
/// Center(
/// child: Text("Second Page"),
/// ),
/// Center(
/// child: Text("Third Page"),
/// )
/// ],
/// );
/// }
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [PageController], which controls which page is visible in the view.
...
...
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