text_form_field_flutter 0.0.4 copy "text_form_field_flutter: ^0.0.4" to clipboard
text_form_field_flutter: ^0.0.4 copied to clipboard

A highly customizable Flutter text form field widget with various label behaviors, styling options, and validation features.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:text_form_field_flutter/text_form_field_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Text Form Field Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter Text Form Field Demo'),
      ),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          children: [
            TextFormFieldFlutter(
              labelText: 'Email',
              hintText: 'Enter your email',
              keyboardType: TextInputType.emailAddress,
              prefixIcon: const Icon(Icons.email),
              validator: (value) {
                if (value == null || value.isEmpty) {
                  return 'Please enter your email';
                }
                return null;
              },
            ),
            const SizedBox(height: 16),
            TextFormFieldFlutter(
              labelText: 'Password',
              hintText: 'Enter your password',
              obscureText: true,
              prefixIcon: const Icon(Icons.lock),
              validator: (value) {
                if (value == null || value.isEmpty) {
                  return 'Please enter your password';
                }
                return null;
              },
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
140
points
50
downloads

Publisher

unverified uploader

Weekly Downloads

A highly customizable Flutter text form field widget with various label behaviors, styling options, and validation features.

Repository (GitHub)
View/report issues

Topics

#form #widget #customizable #text-field

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on text_form_field_flutter