← Back to browser
ai-ml

How I Built a 15,000+ Line Flutter App with Gemini to "Hack" My University Attendance

This is a submission for the Built with Google Gemini: Writing Challenge What I Built with...

*This is a submission for the [Built with Google Gemini: Writing Challenge](https://dev.to/challenges/mlh-built-with-google-gemini-02-25-26)*

What I Built with Google Gemini

<!-- Give us an overview of your project and what problem it solved. What role did Google Gemini play? --> As an IT undergraduate balancing startup ambitions and a heavy coursework load, missing too many classes can lead to disastrous exam bans. To solve this, I built Attendance Tracker (code-named "The 80%"). It's a cross-platform Flutter application designed to mathematically optimize university attendance using offline-first storage and AI.

The app features a "Danger Zone Planner" that calculates the exact margin for absences across specific sessions (Lectures, Labs, Tutorials). This allows students to simulate granular scenarios and understand their attendance buffer, ensuring they never accidentally drop below their mandatory academic thresholds.

Google Gemini played a massive, two-fold role in this project:

1. The Architecture (Agentic AI): This project scaled to over 15,000 lines of code. I used the Gemini 3 Pro (High) model inside the Antigravity IDE as an autonomous coding agent to help architect the offline-first database (Hive), manage state (Provider), and handle complex UI animations.

2. The Core Feature (API Integration): The biggest friction point in attendance apps is manual data entry. I integrated the Gemini 2.5 Flash API to handle multimodal timetable extraction. Users simply upload their official university schedule as a PDF or image, and Gemini intelligently parses the unstructured data into a clean matrix of subjects, times, and session types.

Demo

<!-- This is optional, but we'd love to see your project. --> <!-- If you deployed your project on Cloud Run, you can embed it directly in this post! Check out instructions here: https://dev.to/devteam/you-can-now-embed-cloud-run-deployments-directly-in-your-dev-posts-1jk8 --> <!-- Otherwise, share a link to your deployed project and/or screenshots or a video of your project in action. --> You can experience the live web app directly in your browser:

Live Web App: [Attendance Tracker Web](https://attendance-tracker-5d550.web.app)

Source Code: [GitHub Repository](https://github.com/inusha-thathsara/attendance-tracker-demo/tree/main) (Only the Demo source code is available with the latest apk releases)

Screenshot:

![LightMode Statistics Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d3ckfpqsxomhhgv2kqzi.png)

![DarkMode Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1ehk6d9lprd9ylgtti1.png)

![Module Details](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4n8fsr91yli8nmahhpnu.png)

What I Learned

<!-- Technical skills, soft skills, unexpected lessons — what stuck with you? --> Building a 15,000+ line production app taught me several critical lessons:

Google Gemini Feedback

<!-- What worked well? Where did you need more support or run into friction? Be candid! --> The Good: The multimodal capabilities of gemini-2.5-flash are incredible. It flawlessly handled messy, poorly formatted university PDFs and images, turning unstructured visual data into a clean, usable dataset. Using Gemini 3 Pro (High) as an agentic coding partner felt like having a senior engineer on call, saving me weeks of boilerplate coding and UI tweaking.

The Bad and The Ugly: When you let an AI agent loose on a 15,000-line codebase, you push context windows to their absolute limits. Occasionally, the IDE agent would lose the thread of the architecture, hallucinating variable names or forgetting how distant files interconnected.

On the API side, relying heavily on Gemini 2.5 Flash for file parsing introduced the reality of rate limits. To prevent the app from breaking for users during high-traffic periods, I had to engineer a Multi-API Key Support system, allowing the app to rotate through different user-provided Gemini keys to ensure uninterrupted parsing. Additionally, highly non-standard timetable layouts occasionally confused the model, making the manual draft review step an absolute necessity. Overall, it's a powerhouse, but it requires strict guardrails in a production environment.

<!-- Don't forget to add a cover image if you'd like! -->

<!-- Add a tag relevant to your post topic to help the right people find your work! -->

<!-- Thanks for participating! -->

Have questions about this article?

Ask DocuMind