MyTextEditor class

A customizable text editor widget with support for dropdown suggestions and styling options.

This widget provides a rich text editing experience with features like:

  • Dropdown suggestions
  • Custom styling
  • Clear button functionality
  • Focus management
Inheritance
Available extensions

Constructors

MyTextEditor({Key? key, required TextEditingController textController, required String label, String? hint, bool enabled = true, bool readOnly = false, bool clearable = false, FutureOr<void> onCleared()?, ValueChanged<String>? onChanged, TextInputType? keyboardType, List<TextInputFormatter>? inputFormatters, int? maxLines = 1, TextAlign textAlign = TextAlign.start, TextAlignVertical? textAlignVertical, Future<List<String>> getDropDownOptions()?, ValueChanged<String>? onOptionSelected, Widget leadingBuilder(String)?, String displayStringForOption(String)?, bool filterOption(String option, String input)?, EdgeInsetsGeometry? dropDownItemPadding, Color? dropdownHighlightColor, int maxShowDropDownItems = 5, bool? showListCandidateBelow, bool showAllOnPopWithNonTyping = false, double? height, double? labelFontSize, double? textFontSize, double? hintFontSize, double? borderRadius, double? borderWidth, double? contentPadding, double? inSetVerticalPadding, double? inSetHorizontalPadding, Color normalBorderColor = const Color(0xFFE0E0E0), Color enabledBorderColor = const Color(0xFFE0E0E0), Color focusedBorderColor = const Color(0xFF64B5F6), Color? backgroundColor, Color? textColor, Color? hintColor, Color? labelColor, FontWeight? labelFontWeight, FontWeight? textFontWeight, bool isDense = true, bool showScrollbar = true, FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.always, FloatingLabelAlignment floatingLabelAlignment = FloatingLabelAlignment.start})
Creates a text editor with customizable properties.

Properties

backgroundColor → Color?
final
borderRadius → double?
final
borderWidth → double?
final
clearable → bool
final
contentPadding → double?
final
controller → MyTextEditorController
no setterinherited
displayStringForOption → String Function(String)?
final
final
final
enabled → bool
final
enabledBorderColor → Color
final
filterOption → bool Function(String option, String input)?
final
floatingLabelAlignment → FloatingLabelAlignment
final
floatingLabelBehavior → FloatingLabelBehavior
final
focusedBorderColor → Color
final
getDropDownOptions → Future<List<String>> Function()?
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
final
hint → String?
final
hintColor → Color?
final
hintFontSize → double?
final
inputFormatters → List<TextInputFormatter>?
final
inSetHorizontalPadding → double?
final
inSetVerticalPadding → double?
final
isDense → bool
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
final
label → String
final
labelColor → Color?
final
labelFontSize → double?
final
labelFontWeight → FontWeight?
final
leadingBuilder → Widget Function(String)?
final
marginZero → Widget

Available on Widget, provided by the WidgetMarginX extension

no setter
maxLines → int?
final
maxShowDropDownItems → int
final
normalBorderColor → Color
final
onChanged → ValueChanged<String>?
final
onCleared → FutureOr<void> Function()?
final
onOptionSelected → ValueChanged<String>?
final
paddingZero → Widget

Available on Widget, provided by the WidgetPaddingX extension

no setter
readOnly → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAllOnPopWithNonTyping → bool
final
showListCandidateBelow → bool?
final
showScrollbar → bool
final
sliverBox → Widget

Available on Widget, provided by the WidgetSliverBoxX extension

no setter
tag → String?
no setteroverride
textAlign → TextAlign
final
textAlignVertical → TextAlignVertical?
final
textColor → Color?
final
textController → TextEditingController
final
textFontSize → double?
final
textFontWeight → FontWeight?
final
uniqueId → String
final

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
marginAll(double margin) → Widget

Available on Widget, provided by the WidgetMarginX extension

marginOnly({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget

Available on Widget, provided by the WidgetMarginX extension

marginSymmetric({double horizontal = 0.0, double vertical = 0.0}) → Widget

Available on Widget, provided by the WidgetMarginX extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paddingAll(double padding) → Widget

Available on Widget, provided by the WidgetPaddingX extension

paddingOnly({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) → Widget

Available on Widget, provided by the WidgetPaddingX extension

paddingSymmetric({double horizontal = 0.0, double vertical = 0.0}) → Widget

Available on Widget, provided by the WidgetPaddingX extension

setFocus({String? focusKey, VoidCallback? onPressed, bool opacity = false, Color focusedBorderColor = Colors.grey, double borderWidth = 1.5, Duration animationDuration = const Duration(milliseconds: 350), double opacityBeginScale = 0.65}) → Widget

Available on Widget, provided by the XlyFocusableExtension extension

showRightMenu({required BuildContext context, required List<MyMenuElement> menuElements, MyMenuPopStyle animationStyle = MyMenuPopStyle.reveal, MyMenuStyle? style}) → Widget

Available on Widget, provided by the RightClickMenuExtension extension

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