Current progress

A week has passed since my last post and in this week I put in about 2 days of work regarding the app. In these roughly 10 hours I have done some decent progress and now I will briefly talk about it.

Flutter

So I have decided to use Flutter as the framework for the application, primarily because of its ability to compile for multiple platforms and hot refreshes paired with a relatively simple widget system. Flutter uses Dart programming language which so far has been similar to Java and kinda C, both of which I have worked (regarding my studies in the university) with in the past.

Quick codelab

Trying to be smart, I decided to first get familiar with the framework and Dart, so I did a quick codelab first. I really enjoyed it and really recommend it as it teaches some fundamental skills of Flutter and Dart. I would like to add that the codelab is around an hour, but I really suggest experimenting a little and not just copying all the code without an attempt of understanding it.

Geolocation

So the first and most logical task was getting the users location, so I did what any programmer would do - stole (ahhh borrowed I mean) it from somebody else. However, this code gives me an entire page which shows the gathered information, and I only want the variables - longitude, latitude and adress. So after some fails (due to private/public functions) I decided to create a seperate helper_functions.dart file where I made these functions and variables accessible to other library files. I am not sure whether this is good practise or not but as it works, I am happy for now.

Estimated Time of Arrival

After implementing GPS tracking (IT ASKS FOR PREMISSION DO NOT WORRY) next logical step was to get the Estimated Time of Arrival (ETA). Since the main logic of the app is to react (wake me up) when the ETA reaches specific time (based on user input). So for now I decided to use Google’s Distance Matrix API. I am not sure about how payments work but so far I do not have any debts so it is okay! The logic of this part is very simple, I simply do a HTTPS request with the longtitude and latitude of my location (origins) and the location of the end location (destination). So far I use my location and have hard-coded the coordinates of the destination for testing purposes.

Next objectives

As of now GUI (graphical user interface) is pretty messy, I have some buttons for refreshes and some text to show information.

Very good looking app

Current look of the app

The next goal is to implement a map page, which will act as the home page (similar to Trafi application), where you can select (or search for) bus stations (destination of your trip). After completing this the last part of logic left, is triggering the alarm for waking up.

See you later alligator 🤓

I don’t want to show snippets of cool code yet, because it is very messy and not very cool as of now. Hopefully by the end of the project that changes!