Skip to content

Latest commit

 

History

History

week3

Labs week 3 – stateless widgets & layouts

⚠️ Formatting & analysis

To get full marks for the task, your code must be properly formatted and must not produce any analysis issues. That is, running the following commands in the labs/week3 directory must not report any issues or changes:

dart format --output=none --set-exit-if-changed .
flutter analyze

Your task is to create a simple book store app that displays basic info about books, authors and genres.

You can use the demo app as inspiration. It's not a strict requirement to follow its design or layout; use it as a showcase of the required features.

Your app should have the following:

List of books

This should be the home page of the app

  • Display the available books (the layout is up to you; it can be a list or a grid) – ensure that at least the name and the author of the book is shown
  • Entries should be clickable, and take the user to the book details page

Book details

  • Display information about a book (preferably, all the available data)
  • Clicking on the author or the genre should take the user to the author's or genre's page, respectively

Author page

  • Display information about an author, including their photo
  • Display a list of books by the author (entries should be clickable like in the book list on the home page)

Genre page

  • Display the name of the genre
  • Display the authors that wrote books in this genre
  • Display the books that belong to this genre (entries should be clickable like in the book list on the home page)

Tips & requirements

  • All the required data is available in the Bookstore class from the local bookstore_datapackage.
  • To format dates, use the DateFormat from the intl package
  • To easily create new stateless widgets, use the stless snippet
  • Use context.go or context.push to navigate between pages
  • Do not use built-in complex widgets, like ListTile
  • For tappable widgets, you use InkWell or various Button widgets
  • The simplest way to display images is Image.network
  • Ensure the layouts are at least somewhat responsive, i.e. there are no overflow warnings. Optionally, you can provide different layouts for different breakpoints.
  • Ensure smooth scrolling in long or complex scrollable views by using slivers (e.g., CustomScrollView and SliverList.builder)