MetaFieldRow class

Compact label-plus-trailing-input row used by every bundled editor (ExerciseEditorSheet, MuscleEditorSheet, CategoryEditorSheet, PlanEditorScreen, …).

The label renders in the muted caption style on the left, the child is the trailing input aligned to the right. Use the named constructors for the common cases — they all reduce to the same Padding(Row(label, child)) layout.

Example:

MetaFieldRow.text(
  label: 'Name',
  value: state.name,
  hint: 'Goblet Squat',
  onChanged: (v) => setState(() => state.name = v),
);
Inheritance

Constructors

MetaFieldRow({Key? key, required String label, required Widget child, bool expandChild = true, EdgeInsetsGeometry? padding})
const
MetaFieldRow.stepper({Key? key, required String label, required num value, num min = 0, num max = 1000, num smallStep = 1, bool integer = true, String? unit, required ValueChanged<num> onChanged})
Numeric input backed by a HeroStepper. Same param semantics as the underlying stepper.
factory
MetaFieldRow.text({Key? key, required String label, required String value, String? hint, required ValueChanged<String> onChanged, int maxLines = 1})
Free-text input wrapped in a themed TextField. Single-line by default (uses TextInputAction.next so editors can chain focus); pass maxLines > 1 for notes / description fields.
factory
MetaFieldRow.toggle({Key? key, required String label, required bool value, required ValueChanged<bool> onChanged})
Boolean toggle wrapped in an accent-tinted Switch.
factory

Properties

child Widget
Trailing input. Free-form so editors can supply any widget — text input, HeroStepper, Switch, DropdownButton, chips, etc.
final
expandChild bool
Whether the child should be wrapped in an Expanded. Defaults to true; pass false for naturally-sized trailing widgets like a Switch so they sit flush to the right edge.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
Left-hand label rendered in the muted caption style.
final
padding EdgeInsetsGeometry?
Override for outer padding. Defaults to a comfortable EdgeInsets.symmetric(vertical: t.space2) so multiple rows stack without manual gaps.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

Themed DropdownButton for picking from a fixed list.