Assignment List

Loading preview

Starting the Flutter app

A showcase of Flutter's assignment list functionality

Get the source

Add it to your project

Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.

First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.

How it works

One derived flag, isSubmitted, does most of the work here: it sets the avatar color and swaps between check and assignment icons, while the Chip prints the raw status. Items come from the const _assignments list via ListView.builder. Due dates are plain strings, so nothing sorts them or flags overdue work, and the sample isn’t in date order. onTap shows a demo SnackBar.

Adapting it

  • Store due as a DateTime, then sort by it and add an overdue state.
  • Replace the status string with an enum so a typo can’t silently fall into the pending styling.
  • Use onTap to open the assignment’s detail or submission page.