fatsecret_nutrition 0.1.0+1
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
Installation 📦 #
dependencies:
dotenv: ^4.2.0
fatsecret_nutrition: ^0.0.1
Usage 📚 #
Obtain Client ID and Client Secret #
- Go to the FatSecret Platform Website
- Sign up or log in
- Create a new application
- Copy the Client ID and Client Secret
- Copy the
.env.examplefile to.envin the project root. - Add the Client ID and Client Secret to the
.envfile.
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.