@@ -206,7 +206,6 @@ steps:
206206
207207 import 'package:built_collection/built_collection.dart';
208208 import 'package:flutter/services.dart';
209- import 'package:riverpod/riverpod.dart';
210209 import 'package:riverpod_annotation/riverpod_annotation.dart';
211210
212211 part 'providers.g.dart';
@@ -49383,7 +49382,7 @@ steps:
4938349382 patch: |
4938449383 --- b/generate_crossword/step_04/lib/providers.dart
4938549384 +++ a/generate_crossword/step_04/lib/providers.dart
49386- @@ -3,12 +3,17 @@
49385+ @@ -3,11 +3,16 @@
4938749386 // found in the LICENSE file.
4938849387
4938949388 import 'dart:convert';
@@ -49392,7 +49391,6 @@ steps:
4939249391 import 'package:built_collection/built_collection.dart';
4939349392 +import 'package:flutter/foundation.dart';
4939449393 import 'package:flutter/services.dart';
49395- import 'package:riverpod/riverpod.dart';
4939649394 import 'package:riverpod_annotation/riverpod_annotation.dart';
4939749395
4939849396 +import 'model.dart' as model;
@@ -49401,7 +49399,7 @@ steps:
4940149399 part 'providers.g.dart';
4940249400
4940349401 /// A provider for the wordlist to use when generating the crossword.
49404- @@ -31 ,3 +36 ,77 @@ Future<BuiltSet<String>> wordList(Ref ref) async {
49402+ @@ -30 ,3 +35 ,77 @@ Future<BuiltSet<String>> wordList(Ref ref) async {
4940549403 ..where((word) => re.hasMatch(word)),
4940649404 );
4940749405 }
@@ -50188,7 +50186,7 @@ steps:
5018850186 patch: |
5018950187 --- b/generate_crossword/step_05_a/lib/providers.dart
5019050188 +++ a/generate_crossword/step_05_a/lib/providers.dart
50191- @@ -90 ,13 +90 ,19 @@ Stream<model.Crossword> crossword(Ref ref) async* {
50189+ @@ -89 ,13 +89 ,19 @@ Stream<model.Crossword> crossword(Ref ref) async* {
5019250190 _random.nextInt(size.height),
5019350191 );
5019450192
@@ -50236,7 +50234,7 @@ steps:
5023650234 patch: |
5023750235 --- b/generate_crossword/step_05_b/lib/providers.dart
5023850236 +++ a/generate_crossword/step_05_b/lib/providers.dart
50239- @@ -89 ,19 +89 ,24 @@ Stream<model.Crossword> crossword(Ref ref) async* {
50237+ @@ -88 ,19 +88 ,24 @@ Stream<model.Crossword> crossword(Ref ref) async* {
5024050238 _random.nextInt(size.width),
5024150239 _random.nextInt(size.height),
5024250240 );
@@ -50346,16 +50344,15 @@ steps:
5034650344 patch: |
5034750345 --- b/generate_crossword/step_05_c/lib/providers.dart
5034850346 +++ a/generate_crossword/step_05_c/lib/providers.dart
50349- @@ -3,7 +3,6 @@
50347+ @@ -3,15 +3,14 @@
5035050348 // found in the LICENSE file.
5035150349
5035250350 import 'dart:convert';
5035350351 -import 'dart:math';
5035450352
5035550353 import 'package:built_collection/built_collection.dart';
5035650354 import 'package:flutter/foundation.dart';
50357- @@ -11,8 +10,8 @@ import 'package:flutter/services.dart';
50358- import 'package:riverpod/riverpod.dart';
50355+ import 'package:flutter/services.dart';
5035950356 import 'package:riverpod_annotation/riverpod_annotation.dart';
5036050357
5036150358 +import 'isolates.dart';
@@ -50364,7 +50361,7 @@ steps:
5036450361
5036550362 part 'providers.g.dart';
5036650363
50367- @@ -66 ,58 +65 ,27 @@ class Size extends _$Size {
50364+ @@ -65 ,58 +64 ,27 @@ class Size extends _$Size {
5036850365 }
5036950366 }
5037050367
@@ -50974,7 +50971,7 @@ steps:
5097450971
5097550972 import 'package:built_collection/built_collection.dart';
5097650973 import 'package:flutter/foundation.dart';
50977- @@ -66 ,14 +67 ,21 @@ class Size extends _$Size {
50974+ @@ -65 ,14 +66 ,21 @@ class Size extends _$Size {
5097850975 }
5097950976
5098050977 @riverpod
@@ -50998,7 +50995,7 @@ steps:
5099850995
5099950996 yield* wordListAsync.when(
5100050997 data: (wordList) => exploreCrosswordSolutions(
51001- @@ -82 ,10 +90 ,103 @@ Stream<model.Crossword> crossword(Ref ref) async* {
50998+ @@ -81 ,10 +89 ,103 @@ Stream<model.Crossword> crossword(Ref ref) async* {
5100250999 ),
5100351000 error: (error, stackTrace) async* {
5100451001 debugPrint('Error loading word list: $error');
@@ -51578,23 +51575,23 @@ steps:
5157851575 patch: |
5157951576 --- b/generate_crossword/step_08/lib/providers.dart
5158051577 +++ a/generate_crossword/step_08/lib/providers.dart
51581- @@ -68 ,6 +68 ,7 @@ class Size extends _$Size {
51578+ @@ -67 ,6 +67 ,7 @@ class Size extends _$Size {
5158251579
5158351580 @riverpod
5158451581 Stream<model.WorkQueue> workQueue(Ref ref) async* {
5158551582 + final workers = ref.watch(workerCountProvider);
5158651583 final size = ref.watch(sizeProvider);
5158751584 final wordListAsync = ref.watch(wordListProvider);
5158851585 final emptyCrossword = model.Crossword.crossword(
51589- @@ -87 ,6 +88 ,7 @@ Stream<model.WorkQueue> workQueue(Ref ref) async* {
51586+ @@ -86 ,6 +87 ,7 @@ Stream<model.WorkQueue> workQueue(Ref ref) async* {
5159051587 data: (wordList) => exploreCrosswordSolutions(
5159151588 crossword: emptyCrossword,
5159251589 wordList: wordList,
5159351590 + maxWorkerCount: workers.count,
5159451591 ),
5159551592 error: (error, stackTrace) async* {
5159651593 debugPrint('Error loading word list: $error');
51597- @@ -190 ,3 +192 ,33 @@ class DisplayInfo extends _$DisplayInfo {
51594+ @@ -189 ,3 +191 ,33 @@ class DisplayInfo extends _$DisplayInfo {
5159851595 loading: () => model.DisplayInfo.empty,
5159951596 );
5160051597 }
@@ -52280,7 +52277,7 @@ steps:
5228052277
5228152278 import 'package:built_collection/built_collection.dart';
5228252279 import 'package:flutter/foundation.dart';
52283- @@ -16 ,6 +15 ,8 @@ import 'model.dart' as model;
52280+ @@ -15 ,6 +14 ,8 @@ import 'model.dart' as model;
5228452281
5228552282 part 'providers.g.dart';
5228652283
@@ -52289,15 +52286,15 @@ steps:
5228952286 /// A provider for the wordlist to use when generating the crossword.
5229052287 @riverpod
5229152288 Future<BuiltSet<String>> wordList(Ref ref) async {
52292- @@ -68 ,7 +69 ,6 @@ class Size extends _$Size {
52289+ @@ -67 ,7 +68 ,6 @@ class Size extends _$Size {
5229352290
5229452291 @riverpod
5229552292 Stream<model.WorkQueue> workQueue(Ref ref) async* {
5229652293 - final workers = ref.watch(workerCountProvider);
5229752294 final size = ref.watch(sizeProvider);
5229852295 final wordListAsync = ref.watch(wordListProvider);
5229952296 final emptyCrossword = model.Crossword.crossword(
52300- @@ -81 ,14 +81 ,11 @@ Stream<model.WorkQueue> workQueue(Ref ref) async* {
52297+ @@ -80 ,14 +80 ,11 @@ Stream<model.WorkQueue> workQueue(Ref ref) async* {
5230152298 startLocation: model.Location.at(0, 0),
5230252299 );
5230352300
@@ -52313,7 +52310,7 @@ steps:
5231352310 ),
5231452311 error: (error, stackTrace) async* {
5231552312 debugPrint('Error loading word list: $error');
52316- @@ -98 ,127 +95 ,80 @@ Stream<model.WorkQueue> workQueue(Ref ref) async* {
52313+ @@ -97 ,127 +94 ,80 @@ Stream<model.WorkQueue> workQueue(Ref ref) async* {
5231752314 yield emptyWorkQueue;
5231852315 },
5231952316 );
0 commit comments