single_text_field 0.0.2 copy "single_text_field: ^0.0.2" to clipboard
single_text_field: ^0.0.2 copied to clipboard

A simple text field for Flutter. It is a simple text field with a label and a hint text. and more..

example/main.dart

import 'package:flutter/material.dart';
import 'package:single_text_field/src/single_text_field.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Single Text Field Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const SingleTextFieldExample(),
    );
  }
}

class SingleTextFieldExample extends StatefulWidget {
  const SingleTextFieldExample({super.key});

  @override
  SingleTextFieldExampleState createState() => SingleTextFieldExampleState();
}

class SingleTextFieldExampleState extends State<SingleTextFieldExample> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('Single Text Field Example'),
        ),
        body: Center(
          child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                const SizedBox(height: 8),
                SingleTextField(
                  title: 'First Name',
                  controller: TextEditingController(),
                  onChanged: ((value) {}),
                  onTap: () {},
                ),
                const SizedBox(height: 8),
                const SingleTextField(), // Default
                const SizedBox(height: 8),
                SingleTextField(
                  title: 'Last Name',
                  controller: TextEditingController(),
                  onChanged: ((value) {}),
                  onTap: () {},
                ),
              ]),
        ));
  }
}
1
likes
130
pub points
0%
popularity

Publisher

unverified uploader

A simple text field for Flutter. It is a simple text field with a label and a hint text. and more..

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on single_text_field