AppTextField class

Default Text Form Field

ChatGPT Parameters:

  • enableChatGPT: A flag to enable or disable the ChatGPT feature.
  • promptFieldInputDecoration: Custom input decoration for the prompt field in the chatGpt widget.
  • suffixChatGPTIcon: An optional widget to be displayed as a suffix icon in the ChatGPT input field.
  • loadingChatGPT: An optional widget to be displayed as a loading indicator during ChatGPT response generation.
  • shortReply: If true, it will generate a 1-2 line reply. Default is false.
  • testWithoutKey: If true, it will provide a static test response without using the actual API key. Default is false.
Inheritance
Available Extensions

Constructors

AppTextField({TextEditingController? controller, required TextFieldType textFieldType, InputDecoration? decoration, FocusNode? focus, FormFieldValidator<String>? validator, bool? isPassword, InputCounterWidgetBuilder? buildCounter, bool isValidationRequired = true, TextCapitalization? textCapitalization, TextInputAction? textInputAction, dynamic onFieldSubmitted(String)?, FocusNode? nextFocus, TextStyle? textStyle, TextAlign textAlign = TextAlign.start, int? maxLines, int? minLines, bool? enabled, dynamic onChanged(String)?, Color? cursorColor, Widget? suffix, Color? suffixIconColor, bool? enableSuggestions, bool autoFocus = false, bool readOnly = false, int? maxLength, TextInputType? keyboardType, Iterable<String>? autoFillHints, EdgeInsets? scrollPadding, dynamic onTap()?, double? cursorWidth, double? cursorHeight, List<TextInputFormatter>? inputFormatters, String? errorThisFieldRequired, String? errorInvalidEmail, String? errorMinimumPasswordLength, String? errorInvalidURL, String? errorInvalidUsername, TextAlignVertical? textAlignVertical, bool expands = false, bool? showCursor, TextSelectionControls? selectionControls, StrutStyle? strutStyle, String obscuringCharacter = '•', String? initialValue, Brightness? keyboardAppearance, Widget? suffixPasswordVisibleWidget, Widget? suffixPasswordInvisibleWidget, EditableTextContextMenuBuilder? contextMenuBuilder, String? title, TextStyle? titleTextStyle, int spacingBetweenTitleAndTextFormField = 4, bool enableChatGPT = false, Widget? loaderWidgetForChatGPT, Widget? suffixChatGPTIcon, InputDecoration? promptFieldInputDecorationChatGPT, bool shortReplyChatGPT = false, bool testWithoutKeyChatGPT = false, Key? key})

Properties

autoFillHints Iterable<String>?
final
autoFocus bool
final
buildCounter InputCounterWidgetBuilder?
final
contextMenuBuilder EditableTextContextMenuBuilder?
final
controller TextEditingController?
final
cursorColor Color?
final
cursorHeight double?
final
cursorWidth double?
final
decoration InputDecoration?
final
enableChatGPT bool
final
enabled bool?
final
enableSuggestions bool?
final
errorInvalidEmail String?
final
errorInvalidURL String?
final
errorInvalidUsername String?
final
errorMinimumPasswordLength String?
final
errorThisFieldRequired String?
final
expands bool
final
focus FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
initialValue String?
final
inputFormatters List<TextInputFormatter>?
final
isPassword bool?
final
isValidationRequired bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance Brightness?
final
keyboardType TextInputType?
final
loaderWidgetForChatGPT Widget?
final
maxLength int?
final
maxLines int?
final
minLines int?
final
nextFocus FocusNode?
final
obscuringCharacter String
final
onChanged → (dynamic Function(String)?)
final
onFieldSubmitted → (dynamic Function(String)?)
final
onTap → (dynamic Function()?)
final
promptFieldInputDecorationChatGPT InputDecoration?
final
readOnly bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollPadding EdgeInsets?
final
selectionControls TextSelectionControls?
final
shortReplyChatGPT bool
final
showCursor bool?
final
spacingBetweenTitleAndTextFormField int
final
strutStyle StrutStyle?
final
suffix Widget?
final
suffixChatGPTIcon Widget?
final
suffixIconColor Color?
final
suffixPasswordInvisibleWidget Widget?
final
suffixPasswordVisibleWidget Widget?
final
testWithoutKeyChatGPT bool
final
textAlign TextAlign
final
textAlignVertical TextAlignVertical?
final
textCapitalization TextCapitalization?
final
textFieldType TextFieldType
final
textInputAction TextInputAction?
final
textStyle TextStyle?
final
title String?
final
titleTextStyle TextStyle?
final
validator FormFieldValidator<String>?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _AppTextFieldState
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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