Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: provide missing documentation #8

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions lib/input/stack_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,63 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class StackTextField extends StatefulWidget {
/// A customizable text input field that can be stacked with a label when text is entered.
///
/// [hintText] is the text to display as a hint when the field is empty.
///
/// [controller] is an optional [TextEditingController] to control the text field's text.
///
/// [validator] is an optional function that validates the text input.
///
/// [textInputAction] is an optional [TextInputAction] that specifies the action button to display on the keyboard.
///
/// [inputFormatters] is an optional list of [TextInputFormatter]s that format and constrain the text input.
///
/// [focusNode] is an optional [FocusNode] that manages the focus state of the text field.
///
/// [onChanged] is an optional callback that is called when the text field's content changes.
///
/// [label] is an optional label to be displayed above the text field when text is entered.
///
/// [keyboardType] is an optional [TextInputType] that specifies the type of keyboard to use.
///
/// [onTap] is an optional callback that is called when the text field is tapped.
///
/// [readOnly] is an optional parameter that specifies whether the text field is read-only.
///
/// [suffixIcon] is an optional widget to be displayed at the end of the text field.
///
/// [scrollPadding] is an optional padding that insets the scrollable area to avoid the text field.
///
/// [maxLines] is an optional parameter that specifies the maximum number of lines to allow in the text field.
///
/// [autovalidateMode] is an optional parameter that controls when the text field should validate its content.
///
/// [style] is an optional [TextStyle] to apply to the text field's text.
///
/// [isDense] is an optional parameter that specifies whether the text field is visually dense.
///
/// [prefixIcon] is an optional widget to be displayed at the start of the text field.
///
/// [suffixText] is an optional text to be displayed after the text field.
///
/// [suffixStyle] is an optional [TextStyle] to apply to the suffix text.
///
/// [enabled] is an optional parameter that specifies whether the text field is enabled.
///
/// [onFieldSubmitted] is an optional callback that is called when the text field's content is submitted.
///
/// [textField] is an optional widget to replace the default text field.
///
/// [obscuringText] is an optional parameter that specifies whether the text field obscures its text.
///
/// [onEditingComplete] is an optional callback that is called when editing is complete.
///
/// [onFocusChange] is an optional callback that is called when the focus state of the text field changes.
///
/// [fillColor] is an optional color to fill the background of the text field.
///
/// [labelColor] is an optional color to apply to the label text.
const StackTextField({
required this.hintText,
this.controller,
Expand Down