To complete this recipe, open stopwatch.dart and follow these steps:
- Add some buttons to the screen.
- Update the build method in StopWatchState to replace the Center widget with a Column. You should be able to use the intentions dialog that we discussed in the previous chapter to quickly wrap the Text widget in a Column and then remove the Center widget. When you are done, the build method should look like this:
return Scaffold(
appBar: AppBar(
title: Text('Stopwatch'),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'$seconds ${_secondsText()}',
style: Theme.of(context).textTheme.headline5,
),
SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
style: ButtonStyle(
backgroundColor...