Chris

Notifications

Uses flutter_local_notifications and timezone to schedule weekly notifications. Schedules recurring notifications using the Europe/London timezone, since our users will be based in UK. For example, the user will receive a notification on Monday 12pm to ask them if they wish to publish their last week’s data to the server (if there is some data).

This is implemented using a StreamController of strings that represent the notifications that have already been sent. Then the main screen widget sets a listener that opens the corresponding page depending on the string. The string identifies what type of notification it was and it’s purpose.

I initially tried a naive approach that didn’t use streams, instead just immediately executing code on notification press. However, if the app was closed, the specific widget/screen that needed to open on click wouldn’t do so due to a problem related to the context.

Home Screen

I have completed a first draft of what the home page could look like, the main widget of interest is the circular wellbeing widget. This changes color/gradient depending on what the last wellbeing score was.

First Time Setup

Asks the user for their postcode and support code then stores it using shared_preferences.

Next Steps

Possible next tasks:

  • Schedule Nudges based on low scores
  • Export graph to PDF or JPEG.

Saachi

This week, I finished the pedometer part of the checkup screen page and tested it. I had to adapt what I had made last week as I read that the pedometer package uses a stream and therefore would display the number of steps since the last reboot of the user’s phone, rather than the steps taken in a set time period. I used this tutorial to adapt this stream to display the steps per week, rather than a day. I tested this and it accurately displays the number of steps. This used the hive package which stored the steps calculates the weekly steps.

I also started working on the home page, however, I’m getting build errors due to a ‘duplicate file’, I think this is a symptom of one of the packages we are using, so am working on fixing these before I continue.

Next Steps

Next week, I plan to finish the home page and work on the splash screen intro to the app.