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
| Property | Type | Default | Description |
|---|---|---|---|
macro | Macro | — | calories, protein, carbs or fat. |
value | String? | null | Value 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 Widgetbook → Foundations › Macro badge.