Skip to main content

tldr

copy one file into your project, use it. no setup, no init call.

AppTextField(header: "Email", hintText: "you@site.com", controller: c).

superellipse outline, optional header and description, error state, compact and inline modes for dense layouts.

live demo

starting the demo

install

copy one file

grab it and drop it in at lib/app_text_field.dart.

app_text_field.dart680 lines

it imports material and services from the flutter sdk. nothing goes in pubspec.yaml.

use it

there is no init call. the defaults stand on their own.

AppTextField(
  header: "Email",
  hintText: "you@site.com",
  controller: emailController,
)

usage

standard field with header and helper.

AppTextField(
  header: "Note title",
  hintText: "Weekend haul",
  description: "Shown on your public profile.",
  controller: titleController,
)

error state tints the border, header, and helper.

AppTextField(
  header: "Email",
  controller: emailController,
  errorText: "Enter a valid email",
)

inline mode drops the border for table rows.

AppTextField(
  inline: true,
  hintText: "0",
  controller: repsController,
  keyboardType: TextInputType.number,
)

reference