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
665fff00
Unverified
Commit
665fff00
authored
Nov 12, 2018
by
Greg Spencer
Committed by
GitHub
Nov 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Scaffold docs and example code (#24159)
Upgraded Scaffold example to an application example.
parent
b4cc19ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
23 deletions
+30
-23
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+30
-23
No files found.
packages/flutter/lib/src/material/scaffold.dart
View file @
665fff00
...
...
@@ -657,32 +657,39 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
/// [ScaffoldState] for the current [BuildContext] via [Scaffold.of] and use the
/// [ScaffoldState.showSnackBar] and [ScaffoldState.showBottomSheet] functions.
///
/// {@tool s
ample
}
/// {@tool s
nippet --template=stateful_widget
}
///
/// This example shows a [Scaffold] with an [AppBar], a [BottomAppBar]
/// and a [FloatingActionButton]. The [body] is a [Text] placed in a [Center]
/// in order to center the text within the [Scaffold] and the
/// [FloatingActionButton] is centered and docked within the
/// [BottomAppBar] using [FloatingActionButtonLocation.centerDocked].
/// This example shows a [Scaffold] with an [AppBar], a [BottomAppBar] and a
/// [FloatingActionButton]. The [body] is a [Text] placed in a [Center] in order
/// to center the text within the [Scaffold] and the [FloatingActionButton] is
/// centered and docked within the [BottomAppBar] using
/// [FloatingActionButtonLocation.centerDocked]. The [FloatingActionButton] is
/// connected to a callback that increments a counter.
///
/// ```dart
/// Scaffold(
/// int _count = 0;
///
/// Widget build(BuildContext context) {
/// return Scaffold(
/// appBar: AppBar(
/// title: Text('Sample Code'),
/// ),
/// body: Center(
///
child: Text('Scaffold
'),
///
child: Text('You have pressed the button $_count times.
'),
/// ),
/// bottomNavigationBar: BottomAppBar(
/// child: Container(height: 50.0,),
/// ),
/// floatingActionButton: FloatingActionButton(
/// onPressed: () {},
/// tooltip: 'Increment',
/// onPressed: () => setState(() {
/// _count++;
/// }),
/// tooltip: 'Increment Counter',
/// child: Icon(Icons.add),
/// ),
/// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
/// )
/// );
/// }
/// ```
/// {@end-tool}
///
...
...
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