renderInput method
Implementation
@override
Widget renderInput() {
// return TextField(
// controller: _controller,
// onSubmitted: (_) => handleSubmit(),
// );
return Form(
key: _formKey,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: PhoneFormField(
controller: _controller,
onSubmitted: (_) => handleSubmit(),
style: TextStyle(color: Colors.black),
validator: PhoneValidator.compose([
PhoneValidator.required(context),
PhoneValidator.validMobile(context),
]),
countrySelectorNavigator: CountrySelectorNavigator.dialog(
searchBoxTextStyle: TextStyle(color: Colors.black,fontSize: 22),
subtitleStyle: TextStyle(color: Colors.black),
titleStyle: TextStyle(color: Colors.black),
searchBoxDecoration: InputDecoration(
hintText: "Search for country",
hintStyle: TextStyle(color: Colors.black),
prefixIcon: Icon(Icons.search),
fillColor: Colors.grey,
contentPadding: EdgeInsets.all(10),
filled: true
)
),
onChanged: (value) {
},
countryButtonStyle: CountryButtonStyle(
textStyle: TextStyle(color: Colors.black),
showDropdownIcon: true,
showDialCode: false,
showFlag: true,
showIsoCode: false,
),
decoration: InputDecoration(
labelText: "Phone Number",
border: OutlineInputBorder(),
errorStyle: TextStyle(color: Color(0xFF1E4543)),
),
),
),
const SizedBox(width: 8),
RawMaterialButton(
onPressed: () => handleSubmit(),
elevation: 0,
fillColor: Colors.transparent,
constraints: const BoxConstraints(minWidth: 40, minHeight: 40),
shape: const CircleBorder(
side: BorderSide(color: Color(0xFF4F8162)),
),
child: const Icon(Icons.send, size: 20, color: Color(0xFF4F8162)),
),
],
),
);
}