blob: c035635793ebe107793d55021cc778d84f537eff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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,
),
),
);
}
}
|