Handle pluralisation in Cupertino button demo (#9420)

Also switches to single quotes for consistency with surrounding code.
This commit is contained in:
Chris Bracken
2017-04-17 10:01:03 -07:00
committed by GitHub
parent 0d152a6ba9
commit 2480c4d448

View File

@@ -34,7 +34,9 @@ class _CupertinoButtonDemoState extends State<CupertinoButtonsDemo> {
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget> [
new Text(_pressedCount > 0 ? "Button pressed $_pressedCount times" : " "),
new Text(_pressedCount > 0
? 'Button pressed $_pressedCount time${_pressedCount == 1 ? '' : 's'}'
: ' '),
const Padding(padding: const EdgeInsets.all(12.0)),
new Align(
alignment: const FractionalOffset(0.5, 0.4),