showMobileInput method
Displays the mobile input field.
Implementation
Widget showMobileInput() {
return Padding(
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
child: TextFormField(
controller: _mobileNumberController,
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
autofocus: false,
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
onFieldSubmitted: (text) {
setState(() {
debugPrint("onFieldSubmitted $text");
});
},
onChanged: (txt) {
setState(() {
// _isMobileValidationError = false;
// _isOtpVisible = false;
// _otpController.text = '';
});
},
maxLength: 10,
maxLines: 1,
decoration: InputDecoration(
// labelText: 'Phone Number',
//hasFloatingPlaceholder: true,
prefixIcon: const Padding(
padding: EdgeInsets.only(left: 15, top: 15, bottom: 15),
child: Text(
"+91",
)),
counterStyle: const TextStyle(
height: double.minPositive,
),
counterText: "",
hintText: "Enter mobile number",
fillColor: Colors.teal.withOpacity(0.2),
filled: true,
// floatingLabelBehavior: FloatingLabelBehavior.always,
// labelStyle: Utils().smallBlack16R(),
// errorStyle: TextStyle(
// color: Colors.transparent,
// fontSize: 0,
// ),
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(),
),
);
}