showNameInput method
Displays the name input field.
Implementation
Widget showNameInput() {
return Padding(
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
child: TextFormField(
autofocus: false,
maxLines: 1,
validator: (value){
if (value == null || value.trim().isEmpty) {
return 'Please enter a name';
}
return null;
},
controller: nameController,
decoration: InputDecoration(
counterStyle: const TextStyle(
height: double.minPositive,
),
counterText: "",
floatingLabelBehavior: FloatingLabelBehavior.auto,
labelStyle: const TextStyle(color: Colors.teal),
labelText: "Name",
hintText: "Enter Name",
fillColor: Colors.teal.withOpacity(0.2),
filled: true,
contentPadding:
const EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
errorText: null,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Colors.teal),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Colors.teal),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Colors.teal),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Colors.teal),
)),
// style: Utils().smallBlack18M(),
),
);
}