mirror of
https://github.com/flutter/samples.git
synced 2025-11-11 23:39:14 +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:
@@ -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),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user