Skip to content
On this page

TextEditor

A rich text editing surface backed by a dedicated controller.

TextEditor in FluttyUITextEditor in FluttyUI dark theme

Import

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

API Reference

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

TextEditor

const TextEditor({
  super.key,
  this.size,
  required this.controller,
  this.placeholder = 'Start writing...',
  this.onChanged,
  this.readOnly = false,
  this.autofocus = false,
  this.showToolbar = true,
  this.showWordCount = true,
  this.height = 420,
  this.fontSize = 16,
  this.borderRadius,
  this.padding = const EdgeInsets.all(18),
  this.backgroundColor,
  this.foregroundColor,
  this.secondaryColor,
  this.borderColor,
  this.focusColor,
  this.toolbarColor,
  this.footer,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
controllerTextEditorControllerYes—
placeholderStringNo'Start writing...'
onChangedValueChanged<String>?Nonull
readOnlyboolNofalse
autofocusboolNofalse
showToolbarboolNotrue
showWordCountboolNotrue
heightdoubleNo420
fontSizedoubleNo16
borderRadiusdouble?Nonull
paddingEdgeInsetsGeometryNoconst EdgeInsets.all(18)
backgroundColorColor?Nonull
foregroundColorColor?Nonull
secondaryColorColor?Nonull
borderColorColor?Nonull
focusColorColor?Nonull
toolbarColorColor?Nonull
footerWidget?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/text_editor/text_editor.dart

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

DartFlutter

Get started with FluttyUI