Skip to content

Commit

Permalink
Update crossword sample to account for riverpod updates (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Oct 24, 2024
1 parent 0e6ce7d commit e06cdd5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions samples/crossword/lib/providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dart:convert';
import 'package:built_collection/built_collection.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:riverpod/riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import 'isolates.dart';
Expand All @@ -18,7 +19,7 @@ const backgroundWorkerCount = 4;

/// A provider for the wordlist to use when generating the crossword.
@riverpod
Future<BuiltSet<String>> wordList(WordListRef ref) async {
Future<BuiltSet<String>> wordList(Ref ref) async {
// This codebase requires that all words consist of lowercase characters
// in the range 'a'-'z'. Words containing uppercase letters will be
// lowercased, and words containing runes outside this range will
Expand Down Expand Up @@ -65,7 +66,7 @@ class Size extends _$Size {
}

@riverpod
Stream<model.WorkQueue> workQueue(WorkQueueRef ref) async* {
Stream<model.WorkQueue> workQueue(Ref ref) async* {
final size = ref.watch(sizeProvider);
final wordListAsync = ref.watch(wordListProvider);
final emptyCrossword =
Expand Down
10 changes: 7 additions & 3 deletions samples/crossword/lib/providers.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions samples/crossword/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: crossword
description: A crossword game built with Flutter.
publish_to: 'none'
publish_to: none
version: 0.1.0

environment:
Expand All @@ -12,21 +12,21 @@ dependencies:
characters: ^1.3.0
flutter:
sdk: flutter
flutter_riverpod: ^2.5.1
flutter_riverpod: ^2.6.1
intl: ^0.19.0
riverpod: ^2.5.1
riverpod_annotation: ^2.3.5
riverpod: ^2.6.1
riverpod_annotation: ^2.6.1
two_dimensional_scrollables: ^0.2.1

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
build_runner: ^2.4.9
build_runner: ^2.4.10
built_value_generator: ^8.9.2
custom_lint: ^0.6.4
riverpod_generator: ^2.4.0
riverpod_lint: ^2.3.10
custom_lint: ^0.6.8
riverpod_generator: ^2.6.1
riverpod_lint: ^2.6.1

flutter:
uses-material-design: true
Expand Down

0 comments on commit e06cdd5

Please sign in to comment.