From 7651d5200767a339089dd4021bf77a86b6adcf80 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 11 Sep 2023 01:00:14 +0530 Subject: first commit --- lib/widgets/input_box.dart | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lib/widgets/input_box.dart (limited to 'lib/widgets/input_box.dart') 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 { + @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 -- cgit v1.2.3