mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
add thumbnails to the books example to make memory leaks easier to test (#1353)
* add thumbnails to the books example to make memory leaks easier to test
* also add profile build
* migrate material 3 demo code to avoid warning
* Revert "migrate material 3 demo code to avoid warning"
This reverts commit 7df37d9f65.
* fix lints in various packages
* DoNothingAndStopPropagationIntent const conflicts between stable and beta, add lint ignore for now
This commit is contained in:
@@ -47,7 +47,10 @@ class ViewController: UITableViewController, BKHostBookApi {
|
||||
let authors = (volumeInfo["authors"] as! [String]).joined(separator: " & ")
|
||||
let pageCount = volumeInfo["pageCount"] as! Int32
|
||||
let publishedDate = volumeInfo["publishedDate"] as! String
|
||||
let summary = volumeInfo["description"] as! String
|
||||
let summary = volumeInfo["description"] as! String?
|
||||
let imageLinks = volumeInfo["imageLinks"] as! [String: Any]
|
||||
let thumbnail: BKThumbnail = BKThumbnail.init()
|
||||
thumbnail.url = imageLinks["thumbnail"] as! String?
|
||||
let book: BKBook = BKBook.init()
|
||||
book.author = authors
|
||||
book.title = title
|
||||
@@ -56,6 +59,7 @@ class ViewController: UITableViewController, BKHostBookApi {
|
||||
book.pageCount = NSNumber.init(value: pageCount)
|
||||
book.publishDate = publishedDate
|
||||
book.summary = summary
|
||||
book.thumbnail = thumbnail
|
||||
newBooks.append(book)
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
|
||||
Reference in New Issue
Block a user