Journey into GSoC — Part 5

Omal Vindula
SCoRe Lab
Published in
3 min readJun 21, 2020

Last week I did all the initial configurations needed to start off with development. As per my milestone plan, I started off with incident reporting and viewing functionalities of the app. First I created the incident reporting screen because without creating an incident, there’s no way to view it!

I created UI components, form validations, confirmation prompts and the flask API endpoint that is needed to send this data to the SQL database. I also added the functionality to get the reporter location from the GPS on the phone and use geocoding to get the exact name of the place without having the reporter to type it. I used flutter’s geolocator package for this purpose. The finished UI component turned out to be as follows.

Finished Report Incident Screen

Next up, I added just the UI components of the home screen which displays upcoming events and acts as the route to other components such as the report incident screen which I made above. This is also one of the reasons to have the home screen. So that I have an idea of how the user flow will be when a person is actually using the app. I also mapped routing to report incident component and view reported incident components in the buttons present in the home screen as I could easily access them. Backend for the event screen was not implemented yet as it is a task I have included in my upcoming milestones. For now, the UI looks like this!

Finished Home Screen UI

Then I created the view reported incident screen which allows the user to see the incident that they have reported in a list view as the name implies. This is done by retrieving all the reported incidents relevant to that user ID from the database and then displaying them in the UI. I was also able to learn a lot about the Future objects in flutter which was very similar to async-await in javascript. This list will show the details of the incident reported as well as the status of each report (whether it is verified or not by the admins) and the status of the patient (recovered or not, is being treated, not treated and so on…). I also created a backend endpoint for this feature as well. The final product was as follows.

Finished My Reports Screen

That’s it for this week. Next week I will be handling the user creation and authentication part, which I believe will be fun and interesting… See you guys next week. Until then, stay safe and cheers!

--

--