Commit f8c1d619 authored by Viktor Lidholt's avatar Viktor Lidholt

Fixes spelling in gallery button demo (#3209)

parent 75079684
...@@ -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 iconButtonToggle; bool value;
// Toggable icon button // Toggleable icon button.
new IconButton( new IconButton(
icon: Icons.thumb_up, icon: Icons.thumb_up,
onPressed: () { onPressed: () {
setState(() => iconButtonToggle = !iconButtonToggle); setState(() => value = !value);
}, },
color: iconButtonToggle ? Theme.of(context).primaryColor : null color: value ? 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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment