Food Diary App

Cross-Platform Mobile Application

cd ../projects

The Problem

Maintaining healthy eating habits requires consistent tracking, but relying on cloud-based apps can lead to slow load times and privacy concerns. Users needed a fast, offline-first mobile application that allows them to log their daily meals and track basic health metrics without sacrificing data ownership or dealing with network delays.

The Solution

I developed a cross-platform mobile application utilizing Flutter and Dart, ensuring a native-like experience on both iOS and Android from a single codebase.

To guarantee performance and privacy, I implemented SQLite for local data persistence. This allows users to instantly save meal logs and photos directly to their device. The app also features built-in utility modules, including a BMI calculator and a daily calorie tracker, providing immediate health insights.

Core Architecture

  • > Cross-Platform UI: Designed with Flutter widgets for responsive scaling across varying screen sizes.
  • > Local Persistence: SQLite database integration ensures meal logs and photos are safely stored offline.
  • > Health Utilities: Custom Dart logic created to handle dynamic state changes for BMI and Calorie tracking.

Data Persistence Snippet

// Dart/SQLite logic for inserting a new meal log
Future<void> insertMeal(Meal meal) async {
                    final db = await database;
  
                    await db.insert(
                    'meals',
                    meal.toMap(),
    conflictAlgorithm: ConflictAlgorithm.replace,
  );
}

Tech Stack

Flutter Dart SQLite Mobile App Dev

Timeline

Oct 2024 - Dec 2024

Links

View the full Dart source code and SQLite implementation on GitHub.

Source Code