single_text_field

Last updated:

0 purchases

single_text_field Image
single_text_field Images
Add to Cart

Description:

single text field

Single-Text-Field #
A simple text field for Flutter. It is a simple text field with a label and a hint text. It also has a prefix text and a title. It also has a function to be called when the text field is tapped. and more...
Getting Started #
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
single_text_field: ^0.0.1
copied to clipboard
In your library add the following import:
import 'package:single_text_field/single_text_field.dart';
copied to clipboard
For help getting started with Flutter, view the online documentation.
Usage #

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: () {},
),
]),
));
}
}


copied to clipboard
Parameters #



Parameter
Type
Description




title
String?
The title of the text field


prefixText
String?
The prefix text of the text field


textInputType
TextInputType?
The type of the text field


controller
TextEditingController?
The controller of the text field


onChanged
Function?
The function to be called when the text field is changed


label
String?
The label of the text field


hint
String?
The hint of the text field


enable
bool?
The enabled state of the text field


onTap
Function?
The function to be called when the text field is tapped



Features and bugs #
Please file feature requests and bugs at the issue tracker.
Github Repository #
Single Text Field
Author #
Shubham Kumar - Github

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.