The App Is Almost Ready
Short App Description
The app I was working on, CosmoGram, is ready (almost). It particularly has two pages: one where you get a daily image and the image’s information like its description, radiation level, etc., and the other page is Birthday, where you enter your birthday and get the image that was taken by NASA on that day.
Usage of AI
Stitch: I used Stitch to get the UI elements of the two pages. It is awesome and simple to use. I described my app, its usage, and how it works, and it gave me the UI pretty fast, which was also awesome.
Gemini: In Stitch, if you go to Export, select the pages you want to export, and export in code, it gives you XML code. I pasted this into Gemini and asked what UI elements I could use to achieve this, and I also told it to give me boilerplate code to build upon.
Gemini Image Generation: I also used the Gemini image generation model to generate a custom logo for my app.
Troublesome Things & Breakthroughs
-
Since this was my first project involving APIs using Flutter, I did get errors using Future and all that. I mainly asked Gemini for help regarding it.
-
Downloading the image was probably the most tiresome part. I watched some YouTube videos and implemented it, but the downloaded images were all 0B and could not be opened. I asked Gemini to help troubleshoot it.
-
The Download Abort Fix: Initially, downloading high-resolution assets threw a critical system exception. The issue was that NASA’s image URLs contain complex API query strings, which corrupted the native file extension. I wrote a file-naming filter to strip out the parameters and strictly enforce a clean
.jpgformatting tag. Now, the Android gallery opens the images flawlessly.
What I Just Finished
After taking a quick rest, I figured out exactly how to set up the app image and the title name natively! I updated the underlying AndroidManifest.xml files to clear out the default development metadata templates. The app now cleanly displays with its proper launcher name (CosmoGram) right on my mobile’s home screen, and it successfully loads up with my customized, textless neon-rocket icon asset in the app drawer. Everything is fully live and running on the phone now!
Extra
If you see most Flutter projects, they will probably include many files for different pages. This helps if you are in a company where everyone can work on the app and contribute. But since I was making this as a personal project and I don’t think anyone else will contribute to this, I decided to put all the screens and pages in the codebase inside a single Screen.dart. There is also main.dart, which actually runs the app since the void main(){} function is inside that folder.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.