aboutsummaryrefslogtreecommitdiff
path: root/lib/widgets/input_box.dart
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-09-11 01:00:14 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-09-11 01:00:14 +0530
commit7651d5200767a339089dd4021bf77a86b6adcf80 (patch)
tree3fef13a7f0140b22716bfbc9a7c6e842782b853c /lib/widgets/input_box.dart
first commitv0.0.1
Diffstat (limited to 'lib/widgets/input_box.dart')
-rw-r--r--lib/widgets/input_box.dart36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/widgets/input_box.dart b/lib/widgets/input_box.dart
new file mode 100644
index 0000000..c035635
--- /dev/null
+++ b/lib/widgets/input_box.dart
@@ -0,0 +1,36 @@
+import 'package:flutter/material.dart';
+
+class FormInputBox extends StatefulWidget {
+ const FormInputBox({
+ super.key,
+ //this.textInputType,
+ required this.controller,
+ this.hintText = "",
+ this.obscureText = false,
+ });
+
+ //final TextInputType textInputType;
+ final String hintText;
+ final TextEditingController controller;
+ final bool obscureText;
+
+ @override
+ FormInputBoxState createState() => FormInputBoxState();
+}
+
+class FormInputBoxState extends State<FormInputBox> {
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
+ child: TextFormField(
+ obscureText: widget.obscureText,
+ controller: widget.controller,
+ decoration: InputDecoration(
+ border: const OutlineInputBorder(),
+ hintText: widget.hintText,
+ ),
+ ),
+ );
+ }
+} \ No newline at end of file