Mofilo Nutrient Verifier

pub package License: MIT

Nutrition data validator for user-submitted food data. Checks if data is physically possible and flags values exceeding known toxicity thresholds.


Quick Start

import 'package:mofilo_nutrient_verifier/mofilo_nutrient_verifier.dart';

final food = FoodItem(
  id: 'abc123',
  name: 'Grilled Chicken Breast',
  servingSize: 100,
  servingUnit: 'g',
  protein: 31,
  carbs: 0,
  fat: 3.6,
  calories: 165,
);

final result = NutrientVerifier.verify(food);

if (result.pass) {
  print('✓ Valid food (score: ${result.trustScore}/100)');
  // Safe to add to database
} else {
  print('✗ Invalid food:');
  for (final reason in result.reasons) {
    print('  $reason');
  }
  // Reject submission
}

🎯 Features

🔬 Physics-Based Validation - Blocks nutrition data that violates laws of nature (matter density, energy conservation)

💧 Volume Unit Protection - Advanced validation for liquid foods (ml, cups, fl oz) using physics-based concentration limits

5-Layer Validation Pipeline - Input → Volume → Physics → Energy → Safety (fails fast on first violation)

🛡️ Acute Toxicity Detection - Flags sodium >3000mg, caffeine >400mg, vitamin A levels exceeding FDA guidelines

📊 Trust Scoring - 0-100 confidence score for data quality filtering

⚠️ Binary Pass/Fail - No warnings that allow bad data through (strict quality control)


Installation

dependencies:
  mofilo_nutrient_verifier: ^1.0.0

Then run:

flutter pub get

⚠️ THIS IS NOT MEDICAL ADVICE

This software is a technical validation tool, NOT:

  • ❌ Medical advice or medical nutrition therapy
  • ❌ A substitute for healthcare professionals
  • ❌ Approved by FDA or any medical authority

🩺 Medical Conditions - Consult a Professional

DO NOT rely on this software alone if you have diabetes, kidney disease, heart disease, eating disorders, food allergies, or any medical condition.

ALWAYS consult a Registered Dietitian (RDN) or healthcare provider.

📜 Warranty

This software is provided "AS IS" without warranty of any kind.

Full legal terms: See DISCLAIMER.md and LICENSE


📄 License

MIT License - Copyright (c) 2025 Mofilo

This software is provided "AS IS" without warranty. See DISCLAIMER.md for complete terms.

Built with ❤️ by Mofilo

Libraries

mofilo_nutrient_verifier
Nutrition data validator for user-submitted food data.