This application allows the user to enter the details about their bins (type, colour, etc) and the app will provide a notification to remind them to put them out for collection.
This sample application uses features such as local database storage, CRUD management, background services, navigation and unit testing.
Note: The application has only been tested on Android.
I have written a Blog Post about the development of this application.
The user enters details of their bin, and the next collection date. This uses a standard listview to list the bins, and tapping a record allows the user to view or edit the details. A background service will check for collection due (either today or tomorrow) and display a notification on the users device to remind them about the collection.
Once the collect date has passed, the background service will update the collection date to the next future due date.
To run the app you will need to install flutter. Follow this Get Started guide.
- Clone the repository
git clone https://github.com/zjcz/bin_reminder.git
- Install the dependencies
flutter pub get
- Start the emulator or connect a device
- Run the application
flutter run
- sqlflite Flutter SQLite implementation, used to store the data. I also used the sqflite ffi package to allow sqflite to work on non mobile devices, and when running unit tests.
- font_awesome_flutter Font Awesome icons. Used to illustrate the different bin types.
- material_color_utilities Used to help provide better implementation of the Material Design 3 colour scheme.
- Jiffy Jiffy is used to format dates. I found this more powerful than the intl package.
- flutter_local_notifications This package is used to trigger notifications.
- clock This package allows use to mock the current date/time within the unit tests
I have written a number of unit tests to test the basic functionality of the application. These can be run using the following command:
flutter test
This project is licensed under the terms of the MIT License.
While not a requirement of the MIT License, I kindly request that you reach out to me if you plan to use this code for your own project. I'd love to hear if you find this useful!