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
b7807ce8
Commit
b7807ce8
authored
Feb 08, 2019
by
Kartik Sharma
Committed by
Hans Muller
Feb 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update an IconButton sample, add RaisedButton sample (#27169)
parent
4e8b732f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
5 deletions
+59
-5
icon_button.dart
packages/flutter/lib/src/material/icon_button.dart
+19
-5
raised_button.dart
packages/flutter/lib/src/material/raised_button.dart
+40
-0
No files found.
packages/flutter/lib/src/material/icon_button.dart
View file @
b7807ce8
...
...
@@ -47,11 +47,25 @@ const double _kMinButtonSize = 48.0;
/// ```
///
/// ```dart
/// Widget build(BuildContext) {
/// return IconButton(
/// icon: Icon(Icons.volume_up),
/// tooltip: 'Increase volume by 10%',
/// onPressed: () { setState(() { _volume *= 1.1; }); },
/// Widget build(BuildContext context) {
/// return Scaffold(
/// body: Center(
/// child: Column(
/// mainAxisSize: MainAxisSize.min,
/// children: <Widget>[
/// IconButton(
/// icon: Icon(Icons.volume_up),
/// tooltip: 'Increase volume by 10',
/// onPressed: () {
/// setState(() {
/// _volume += 10;
/// });
/// },
/// ),
/// Text('Volume : $_volume')
/// ],
/// ),
/// ),
/// );
/// }
/// ```
...
...
packages/flutter/lib/src/material/raised_button.dart
View file @
b7807ce8
...
...
@@ -31,6 +31,46 @@ import 'theme_data.dart';
/// Raised buttons have a minimum size of 88.0 by 36.0 which can be overidden
/// with [ButtonTheme].
///
/// {@tool snippet --template=stateless_widget}
///
/// This sample shows how to render a disabled RaisedButton, an enabled RaisedButton
/// and lastly a RaisedButton with gradient background.
///
/// ```dart
/// Scaffold(
/// body: Center(
/// child: Column(
/// mainAxisSize: MainAxisSize.min,
/// children: <Widget>[
/// RaisedButton(
/// onPressed: null,
/// child: const Text('Disabled Button'),
/// ),
/// RaisedButton(
/// onPressed: () {},
/// child: const Text('Enabled Button'),
/// ),
/// RaisedButton(
/// onPressed: () {},
/// textColor: Colors.white,
/// padding: const EdgeInsets.all(0.0),
/// child: Container(
/// decoration: const BoxDecoration(
/// gradient: LinearGradient(
/// colors: <Color>[Colors.red, Colors.green, Colors.blue],
/// ),
/// ),
/// padding: const EdgeInsets.all(10.0),
/// child: Text('Gradient Button'),
/// ),
/// ),
/// ],
/// ),
/// ),
/// )
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [FlatButton], a material design button without a shadow.
...
...
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