Devblog 4: Sidetracked

Photo by Pablo García Saldaña on Unsplash

Devblog 4: Sidetracked

Stephan E.G. Veenstra's photo
Stephan E.G. Veenstra
·Nov 15, 2022·

4 min read

Table of contents

  • Obsession with declarative navigation
  • Fixing my very first Flutter app
  • Back on track

I'm ashamed of myself...

TL:DR; I've made ZERO progress on the app...

I've you are here only for the update, you can stop reading this devblog right now.

Are you curious for the reason, then stick around and continue reading!

Obsession with declarative navigation

In the previous blogpost I've talked about my idea for declarative navigation. Because of the state management solution that I'm using utilizes a single source of truth, I thought it would benefit from a fully declarative way of navigation.

image.png

I've got so obsessed with the idea that I could hardly think of anything else. But the more I thought about it, the more problems arose.

Also, another Twitter user (Ray Li) warned me for the box of Pandora I was about to open...

And he was right, so damn right!

Eventually I realized that, even if it could be done, it would not be worth the trade-off. Because basing the navigation on state would mean the state should be distinctive enough to do so. Which in turn means that you have to make the state more complex.

Adding this extra information to the state also causes a tight coupling between the state and navigation. I started with just thinking about mobile apps. In that case it probably would work. But Flutter has the power to build for so many different platforms. When I thought about declarative navigation while supporting different platforms, I soon realized it would never work.

As soon as I realized I had hit a dead-end, I could put it beside me... finally... peace of mine... until..

Fixing my very first Flutter app

Schermafbeelding 2022-11-15 om 20.28.19.png

When I was checking out my Firebase console, I stumbled on my AdMob environment and found out that I have € 62 euro's in there. But they only pay once I reach € 70. I would never reach this amount because as of feb this year, adMob restricted the ads from my app because they updated their policy and my app did not met the new requirements.

I also saw that, even though I did nothing about the app, it still had 60~70 daily active users, meaning it had improved over time as well! It even crossed 10k downloads! So I thought that if I just made this small update to comply with the new rules, I would reach that € 70 threshold in no-time.

So close, yet so far

The app first released in the end of 2018. It was my first ever Flutter app which I've build just weeks after first using Flutter.

The moment I learned about bloc, when I landed my first full-time Flutter job in jan '21, I decided to make a big update. The first version was basically a single file, so structuring the project was a great improvement. I also added achievements while I was at it.

As you probably know, mobile platforms develop really fast. So when I realized I would be updating code that's almost 2 years old, I knew I was not going to be an hours work. But it became much more than I expected.

Dependency hell

It all started when I just wanted to make the changes needed, without updating anything. I soon found out that an update was required to be compliant with some of the new rules. When I saw to my surprise that I was on the latest version, I realized the package had been replaced.

This new package had a different API so I had to make a new implementation of my AdHelper class. But that was not just it. I also needed to update Firebase packages, which required a higher Flutter version. Ow, and because the minimum Dart version had to be raised, I also had to migrate the app to null-safe code.

So I went through all of this and finally was able to upload a new version.

Google play time

So I was about to publish the new version. And yet again, I ran into another wall. Google Play hadn't been standing still. Before I was allowed to publish I had to fill out a bunch of forms, ugh...

image.png

Submit for verification

Uploading a new version was the first step. Now I had to submit my app for review to AdMob, explaining the changes I made to comply to the rules. This could take up till a week...

I hope that it will just be approved and that the app can run for another 2 years!

Back on track

Now that I've closed these two sidetracks, I can finally continue working on my app! I feel like I regained focus and I'm thinking about tracking my task again, as I've done with previous pet projects. This has greatly helped me stay on track.

Hopefully you found this devblog still interesting and I see you in the next devblog!

 
Share this