nutrientfacts 0.0.7

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 44

nutrientfacts

Widget to render Nutrition Facts labels

nutrientfacts

Featuring:

  • Full Nutrition Facts label rendering
  • Automatic missing values handling
  • Automatic Daily Value % calculation

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

[0.0.7]

  • Added support for Dart 2

[0.0.6]

  • Meta data nutrient infromation moved to MetaDataNutrient class

[0.0.4]

  • Fully operational Widget

[0.0.1]

  • Initual layout made

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:nutrientfacts/nutrientfacts.dart';

final nutrientData = {
  "CA": {"amount": 37.5, "unit": "mg"},
  "CHOCDF": {"amount": 342.1, "unit": "g"},
  "CHOLE": {"amount": 16.561, "unit": "mg"},
  "ENERC_KCAL": {"amount": 2135.9, "unit": "kcal"},
  "FAT": {"amount": 67.51, "unit": "g"},
  "FE": {"amount": 18.2, "unit": "mg"},
  "FIBTG": {"amount": 12.90, "unit": "g"},
  "FOLAC": {"amount": 385.0, "unit": "mcg"},
  "K": {"amount": 676.7, "unit": "mg"},
  "MG": {"amount": 133.07, "unit": "mg"},
  "NA": {"amount": 1038.89, "unit": "mg"},
  "NIA": {"amount": 19.49, "unit": "mg"},
  "P": {"amount": 381.19, "unit": "mg"},
  "PROCNT": {"amount": 35.99, "unit": "g"},
  "RIBF": {"amount": 1.6, "unit": "mg"},
  "SE": {"amount": 84.75, "unit": "mcg"},
  "SUGAR": {"amount": 74.49, "unit": "g"},
  "THIA": {"amount": 2.74, "unit": "mg"},
  "VITA_IU": {"amount": 5.0, "unit": "IU"},
  "VITB6A": {"amount": 0.11, "unit": "mg"},
  "VITD": {"amount": 28.39, "unit": "IU"},
  "VITK1": {"amount": 0.75, "unit": "mcg"},
  "ZN": {"amount": 2.93, "unit": "mg"},
  "SATFAT": {"amount": 4.2, "unit": "g"},
  "TRANSFAT": {"amount": 4.2, "unit": "g"},
  "FIBER": {"amount": 4.23456, "unit": "g"},
};

void main() {
  runApp(MaterialApp(
    debugShowCheckedModeBanner: false,
    theme: ThemeData.light(),
    title: "Nutritional Facts!",
    home: NutritionFacts(nutrientData: nutrientData),
  ));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  nutrientfacts: ^0.0.7

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:nutrientfacts/nutrientfacts.dart';
  
Version Uploaded Documentation Archive
0.0.7 Aug 14, 2018 Go to the documentation of nutrientfacts 0.0.7 Download nutrientfacts 0.0.7 archive
0.0.6 Aug 3, 2018 Go to the documentation of nutrientfacts 0.0.6 Download nutrientfacts 0.0.6 archive
0.0.5 Jul 25, 2018 Go to the documentation of nutrientfacts 0.0.5 Download nutrientfacts 0.0.5 archive
0.0.4 Jul 25, 2018 Go to the documentation of nutrientfacts 0.0.4 Download nutrientfacts 0.0.4 archive
0.0.3 Jul 25, 2018 Go to the documentation of nutrientfacts 0.0.3 Download nutrientfacts 0.0.3 archive
0.0.2 Jul 24, 2018 Go to the documentation of nutrientfacts 0.0.2 Download nutrientfacts 0.0.2 archive
0.0.1 Jul 23, 2018 Go to the documentation of nutrientfacts 0.0.1 Download nutrientfacts 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

We analyzed this package on Dec 6, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
carousel_slider ^0.0.6 0.0.7 1.0.1
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test