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
f8c1d619
Commit
f8c1d619
authored
Apr 08, 2016
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes spelling in gallery button demo (#3209)
parent
75079684
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
buttons_demo.dart
examples/material_gallery/lib/demo/buttons_demo.dart
+20
-20
No files found.
examples/material_gallery/lib/demo/buttons_demo.dart
View file @
f8c1d619
...
@@ -8,11 +8,11 @@ import '../gallery/demo.dart';
...
@@ -8,11 +8,11 @@ import '../gallery/demo.dart';
const
String
_raisedText
=
const
String
_raisedText
=
"# Raised buttons
\n
"
"# Raised buttons
\n
"
"Raised buttons add dimension to mostly flat layouts. They emphasize"
"Raised buttons add dimension to mostly flat layouts. They emphasize
"
"functions on busy or wide spaces."
;
"functions on busy or wide spaces."
;
const
String
_raisedCode
=
const
String
_raisedCode
=
"""// Create a
flat button
"""// Create a
raised button.
new RaisedButton(
new RaisedButton(
child: new Text('BUTTON TITLE'),
child: new Text('BUTTON TITLE'),
onPressed: () {
onPressed: () {
...
@@ -20,21 +20,21 @@ new RaisedButton(
...
@@ -20,21 +20,21 @@ new RaisedButton(
}
}
);
);
// Create a disabled button
// Create a disabled button
.
//
The button is disabled because there is no
//
Buttons are disabled when onPressed isn't
//
onPressed method specified
//
specified or is null.
new RaisedButton(
new RaisedButton(
child: new Text('BUTTON TITLE')
child: new Text('BUTTON TITLE')
);"""
;
);"""
;
const
String
_flatText
=
const
String
_flatText
=
"# Flat buttons
\n
"
"# Flat buttons
\n
"
"A flat button
is made of ink that displays ink reactions
on press "
"A flat button
displays an ink splash
on press "
"but does not lift. Use flat buttons on toolbars, in dialogs and "
"but does not lift. Use flat buttons on toolbars, in dialogs and "
"inline with padding"
;
"inline with padding"
;
const
String
_flatCode
=
const
String
_flatCode
=
"""// Create a flat button
"""// Create a flat button
.
new FlatButton(
new FlatButton(
child: new Text('BUTTON TITLE'),
child: new Text('BUTTON TITLE'),
onPressed: () {
onPressed: () {
...
@@ -42,9 +42,9 @@ new FlatButton(
...
@@ -42,9 +42,9 @@ new FlatButton(
}
}
);
);
// Create a disabled button
// Create a disabled button
.
//
The button is disabled because there is no
//
Buttons are disabled when onPressed isn't
//
onPressed method specified
//
specified or is null.
new FlatButton(
new FlatButton(
child: new Text('BUTTON TITLE')
child: new Text('BUTTON TITLE')
);"""
;
);"""
;
...
@@ -56,15 +56,15 @@ const String _dropdownText =
...
@@ -56,15 +56,15 @@ const String _dropdownText =
"arrow."
;
"arrow."
;
const
String
_dropdownCode
=
const
String
_dropdownCode
=
"""// Member variable holding value
"""// Member variable holding value
.
String dropdownValue
String dropdownValue
// Drop down button with string values
// Drop down button with string values
.
new DropDownButton<String>(
new DropDownButton<String>(
value: dropdownValue,
value: dropdownValue,
onChanged: (String newValue) {
onChanged: (String newValue) {
// null indicates the user didn't select a
// null indicates the user didn't select a
// new value
// new value
.
setState(() {
setState(() {
if (newValue != null)
if (newValue != null)
dropdownValue = newValue;
dropdownValue = newValue;
...
@@ -84,27 +84,27 @@ const String _iconText =
...
@@ -84,27 +84,27 @@ const String _iconText =
"selected or deselected, such as adding or removing an item's star."
;
"selected or deselected, such as adding or removing an item's star."
;
const
String
_iconCode
=
const
String
_iconCode
=
"""// Member variable holding toggle value
"""// Member variable holding toggle value
.
bool
iconButtonToggl
e;
bool
valu
e;
// Togg
able icon button
// Togg
leable icon button.
new IconButton(
new IconButton(
icon: Icons.thumb_up,
icon: Icons.thumb_up,
onPressed: () {
onPressed: () {
setState(() =>
iconButtonToggle = !iconButtonToggl
e);
setState(() =>
value = !valu
e);
},
},
color:
iconButtonToggl
e ? Theme.of(context).primaryColor : null
color:
valu
e ? Theme.of(context).primaryColor : null
)"""
;
)"""
;
const
String
_actionText
=
const
String
_actionText
=
"# Floating action buttons
\n
"
"# Floating action buttons
\n
"
"Floating action buttons are used for a promoted action. They are "
"Floating action buttons are used for a promoted action. They are "
"distinguished by a circled icon floating above the UI and have motion "
"distinguished by a circled icon floating above the UI and
can
have motion "
"behaviors that include morphing, launching, and a transferring anchor "
"behaviors that include morphing, launching, and a transferring anchor "
"point."
;
"point."
;
const
String
_actionCode
=
const
String
_actionCode
=
"""// Floating action button in Scaffold
"""// Floating action button in Scaffold
.
new Scaffold(
new Scaffold(
appBar: new AppBar(
appBar: new AppBar(
title: new Text('Demo')
title: new Text('Demo')
...
...
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