@@ -210,7 +210,6 @@ packages, on [the Package site](https://pub.dartlang.org/flutter).
210
210
211
211
3. In `lib/main.dart`, import the new package:
212
212
213
- <!-- skip -->
214
213
<?code-excerpt path-base="codelabs/startup_namer/step2_use_package"?>
215
214
<?code-excerpt "lib/main.dart" title retain="/^import/" replace="/import.*?english.*/[!$&!]/g" indent-by="2"?>
216
215
```dart
@@ -299,7 +298,6 @@ a child inside the existing `MyApp` stateless widget.
299
298
1. Create a minimal state class. Add the following to the bottom
300
299
of `main.dart`:
301
300
302
- <!-- skip -->
303
301
<?code-excerpt "lib/main.dart (RandomWordsState)" title region="RWS-class-only" plaster="// TODO Add build() method" indent-by="2"?>
304
302
```dart
305
303
class RandomWordsState extends State<RandomWords> {
@@ -322,7 +320,6 @@ a child inside the existing `MyApp` stateless widget.
322
320
2. Add the stateful `RandomWords` widget to `main.dart`.
323
321
The `RandomWords` widget does little else beside creating its State class:
324
322
325
- <!-- skip -->
326
323
<?code-excerpt "lib/main.dart (RandomWords)" title indent-by="2"?>
327
324
```dart
328
325
class RandomWords extends StatefulWidget {
@@ -338,7 +335,6 @@ a child inside the existing `MyApp` stateless widget.
338
335
339
336
3. Add the `build()` method to `RandomWordsState`:
340
337
341
- <!-- skip -->
342
338
<?code-excerpt "lib/main.dart (RandomWordsState)" title indent-by="2" replace="/(\n )(.*)/$1[!$2!]/g"?>
343
339
```dart
344
340
class RandomWordsState extends State<RandomWords> {
@@ -418,7 +414,6 @@ lazily, on demand.
418
414
class for saving suggested word pairings.
419
415
Also, add a `_biggerFont` variable for making the font size larger.
420
416
421
- <!-- skip -->
422
417
<?code-excerpt "lib/main.dart" title region="RWS-var" indent-by="2" replace="/final .*/[!$&!]/g"?>
423
418
```dart
424
419
class RandomWordsState extends State<RandomWords> {
@@ -448,7 +443,6 @@ lazily, on demand.
448
443
449
444
2. Add a `_buildSuggestions()` function to the `RandomWordsState` class:
450
445
451
- <!-- skip -->
452
446
<?code-excerpt "lib/main.dart (_buildSuggestions)" title indent-by="2"?>
453
447
```dart
454
448
Widget _buildSuggestions() {
@@ -486,7 +480,6 @@ lazily, on demand.
486
480
487
481
3. Add a `_buildRow()` function to `RandomWordsState`:
488
482
489
- <!-- skip -->
490
483
<?code-excerpt "lib/main.dart (_buildRow)" title indent-by="2"?>
491
484
```dart
492
485
Widget _buildRow(WordPair pair) {
@@ -506,7 +499,6 @@ lazily, on demand.
506
499
implements the basic Material Design visual layout.)
507
500
Replace the method body with the highlighted code:
508
501
509
- <!-- skip -->
510
502
<?code-excerpt "lib/main.dart (build)" title region="RWS-build" replace="/(\n )(return.*| .*|\);)/$1[!$2!]/g" indent-by="2"?>
511
503
```dart
512
504
@override
0 commit comments