1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-12 07:48:55 +00:00

Cleanup to navigation_and_routing sample (#881)

- make more things private and final, where possible
- remove unused members
- used expression bodies, where possible
This commit is contained in:
Kevin Moore
2021-08-26 09:16:27 -07:00
committed by GitHub
parent 410e43fbc1
commit fa7dec1475
20 changed files with 221 additions and 284 deletions

View File

@@ -32,15 +32,11 @@ class Library {
allBooks.add(book);
}
List<Book> get popularBooks {
return [
...allBooks.where((book) => book.isPopular),
];
}
List<Book> get popularBooks => [
...allBooks.where((book) => book.isPopular),
];
List<Book> get newBooks {
return [
...allBooks.where((book) => book.isNew),
];
}
List<Book> get newBooks => [
...allBooks.where((book) => book.isNew),
];
}