MacroMath UI
Foundations

Macro badge

A pill that labels a value with its macronutrient color.

App · Flutter · macromath_mobile

A small pill that ties a value to the color of its macronutrient. Useful in lists, summaries and headers.

Protein · 120 gCarbs · 210 gFat · 60 gWater · 2.0 L

Properties

PropertyTypeDefaultDescription
macroMacrocalories, protein, carbs or fat.
valueString?nullValue to show (e.g. 120 g). If omitted, shows the name only.

Usage

MmMacroBadge(macro: Macro.protein, value: '120 g');
MmMacroBadge(macro: Macro.carbs);

See every variant in the WidgetbookFoundations › Macro badge.

On this page