Skip to content

Commit

Permalink
Update pkgs/flutter_http_example/lib/book.dart
Browse files Browse the repository at this point in the history
Co-authored-by: Nate Bosch <[email protected]>
  • Loading branch information
brianquinlan and natebosch authored Nov 6, 2023
1 parent 6c212f9 commit 264cb19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkgs/flutter_http_example/lib/book.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class Book {
final items = jsonItems.cast<Map<String, Object?>>();

for (final item in items) {
if (item.containsKey('volumeInfo')) {
final volumeInfo = item['volumeInfo'] as Map;
if (item case {'volumeInfo': final volumeInfo as Map}) {
if (volumeInfo['title'] is String &&
volumeInfo['description'] is String &&
volumeInfo['imageLinks'] is Map &&
Expand Down

0 comments on commit 264cb19

Please sign in to comment.