text_field_custom 0.0.1
text_field_custom: ^0.0.1 copied to clipboard
In this package I have customized the textformfield for easy use.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:text_field_custom/text_field_custom.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Custom Text field'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextFieldCustom(
hintText: "Hint goes here",
onTap: () {
print("On tap action called");
},
isRequired: true,
title: "Title goes here",
border: const OutlineInputBorder(),
),
],
),
);
}
}