Skip to content
On this page

Label

A text label for a form field or control.

Label in FluttyUILabel in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

Usage

const ui.Label(
  isRequired: true,
  child: Text('Email address'),
)

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Label

const Label({
  super.key,
  this.size,
  required this.child,
  this.isRequired = false,
  this.isInvalid = false,
  this.color,
  this.requiredColor,
  this.invalidColor,
  this.fontSize,
  this.fontWeight,
  this.spacing,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
childWidgetYes—
isRequiredboolNofalse
isInvalidboolNofalse
colorColor?Nonull
requiredColorColor?Nonull
invalidColorColor?Nonull
fontSizedouble?Nonull
fontWeightFontWeight?Nonull
spacingdouble?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/forms/label/label.dart

This reference is generated from the Label declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI