Buddy is an app that aims to help people passing through difficult situations, like crisis, depression, sadness, loss of a loved one or with suicidal thoughts. It shows daily notifications on the user's phone with helping, inspiring, encouraging, caring quotes and tips to help and make the person feel better. It also shows a list of contacts like phone numbers, websites, emails, of helping lines and institutions, if the user wants to talk with somebody and/or asking for more help.
This project is made entirely with Flutter and as a submission to the Flutter Create contest. It was developed having in mind all the rules and guidelines provided by the contest.
The app is prepared to run on iOS and Android.
To review the code (main.dart), please first use Dart Formatter (dartfmt) to make the code more easily readable. Because in order to keep the code small (under 5kb), I had to strip some unnecessary characters, spaces, indentation, which doesn't affect the code at all, just allows the file to be smaller. And it's permitted under the contest rules.
This app will show a list of options for the user. Once the user selects one, it shows a dialog asking the user if he confirms starting receiving daily notifications with quotes and tips about the selected topic. The can confirm, close the dialog or cancel all notifications.
When the user confirms to receive daily notifications, the app will schedule the notifications in the system, natively on iOS and Android. The app can be closed then.
For the sake of this project, there's a data.json file in the assets folder that holds the menu options and the quotes showed in the notifications. The app loads this file when it initiates, builds the menu and gets the quotes data. It could have been done reading an online REST API, but I wanted to keep it simple, reading the data locally. On a production version of this app, I would probably use an own backend server to manage the data and send push notifications, instead of local notifications.
- flare_flutter
- To be able to show the Flare animated objects.
- flutter_local_notifications
- To schedule and show local notifications on iOS and Android.
- url_launcher
- To open a URL on the native browser.
- easy_listview
- To have a more concise way to create and show a listview, with header and footer.
- flutter_launcher_icons
- To create the app launch icon on the various formats for iOS and Android.
The author created all the visual elements of the app:
The animated elements were create using Flare free online tool and integrated into the app with flare_flutter package.
Carlos E. Torres
Senior software engineer, mobile solutions specialist, product manager, entrepreneur, tech startups lover and Spiritist.
- Website: https://cetorres.com
- Email: cetorres@cetorres.com
- Github: https://github.com/cetorres
- LinkedIn: https://linkedin.com/in/cetorres