fatsecret_nutrition 0.1.0+1 copy "fatsecret_nutrition: ^0.1.0+1" to clipboard
fatsecret_nutrition: ^0.1.0+1 copied to clipboard

A Dart package for interacting with the FatSecret Nutrition API

Fatsecret Nutrition #

Developed by F3 Software 🚀

A Dart package for interacting with the FatSecret Nutrition API by F3 Software

License: MIT

Installation 📦 #

dependencies:
  dotenv: ^4.2.0
  fatsecret_nutrition: ^0.0.1

Usage 📚 #

Obtain Client ID and Client Secret #

  1. Go to the FatSecret Platform Website
  2. Sign up or log in
  3. Create a new application
  4. Copy the Client ID and Client Secret
  5. Copy the .env.example file to .env in the project root.
  6. Add the Client ID and Client Secret to the .env file.
CLIENT_ID=your_client_id
CLIENT_SECRET=your_client_secret

Set Up Environment Variables #

export CLIENT_ID=your_client_id
export CLIENT_SECRET=your_client_secret

Initialize The Client #

final env = DotEnv(includePlatformEnvironment: true)..load();
final fatSecret = FatSecretNutrition(
    clientId: env['CLIENT_ID']!,
    clientSecret: env['CLIENT_SECRET']!,
);

Search for a Food Item #

final foodItem = await fatSecret.searchFood(query: 'apple');
print(foodItem);

Features #

Feature Status
Foods: Autocomplete Search
Foods: Find Id For Barcode
Foods: Search
Foods: Get By Id
Food Brands: Get All
Food Categories: Get All
Food Sub Categories: Get All
Recipies: Get By ID
Recipies: Search
Recipie: Types
Profile: Foods
Profile: Recipes
Profile: Saved Meals
Profile: Authentication
Profile: Food Diary
Profile: Exercise Diary
Profile: Weight Diary

License 📝 #

This project is licensed under the MIT License.

1
likes
0
points
94
downloads

Publisher

verified publisherf3software.com

Weekly Downloads

A Dart package for interacting with the FatSecret Nutrition API

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

build_runner, dio, dotenv, freezed_annotation, http, json_annotation, sortedmap

More

Packages that depend on fatsecret_nutrition