Skip to content
On this page

Input

A single-line editable input driven by a text controller.

Input in FluttyUIInput in FluttyUI dark theme

Import

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

Usage

Create a TextEditingController in your state object and dispose it when the widget is removed.

ui.Input(
  controller: controller,
  placeholder: 'Your name',
)

API Reference

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

Input

const Input({
  super.key,
  this.size,
  required this.controller,
  this.placeholder,
  this.focusNode,
  this.readOnly = false,
  this.autofocus = false,
  this.autocorrect = true,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.autofillHints,
  this.inputFormatters,
  this.onSubmitted,
  this.onEditingComplete,
  this.enabled = true,
  this.obscureText = false,
  this.keyboardType = TextInputType.text,
  this.onChanged,
  this.padding,
  this.backgroundColor,
  this.foregroundColor,
  this.placeholderColor,
  this.borderColor,
  this.focusedBorderColor,
  this.borderRadius,
  this.height,
  this.fontSize,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
controllerTextEditingControllerYes—
placeholderString?Nonull
focusNodeFocusNode?Nonull
readOnlyboolNofalse
autofocusboolNofalse
autocorrectboolNotrue
textInputActionTextInputAction?Nonull
textCapitalizationTextCapitalizationNoTextCapitalization.none
autofillHintsIterable<String>?Nonull
inputFormattersList<TextInputFormatter>?Nonull
onSubmittedValueChanged<String>?Nonull
onEditingCompleteVoidCallback?Nonull
enabledboolNotrue
obscureTextboolNofalse
keyboardTypeTextInputTypeNoTextInputType.text
onChangedValueChanged<String>?Nonull
paddingEdgeInsetsGeometry?Nonull
backgroundColorColor?Nonull
foregroundColorColor?Nonull
placeholderColorColor?Nonull
borderColorColor?Nonull
focusedBorderColorColor?Nonull
borderRadiusdouble?Nonull
heightdouble?Nonull
fontSizedouble?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/input/input.dart

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

DartFlutter

Get started with FluttyUI