Recently I started making an admin panel on a desktop and using a text form field to take input from the user but unfortunately, the keyboard cannot write data inside the text field, I searched on Google and did not find any solution, please can someone help me?
Here is some of the text fields that I am using in my project:
Container(
width: 200,
margin: EdgeInsets.all(15),
child: TextFormField(
onChanged: (value) {
referalName.text = value;
},
validator: (value) {
if (value!.isEmpty) {
return 'Please Enter Referal Code';
}
return null;
},
controller: referalName,
style: TextStyle(
fontSize: 24,
color: Colors.blue,
fontWeight: FontWeight.w600,
),
decoration: InputDecoration(
focusColor: Colors.white,
//add prefix icon
prefixIcon: Icon(
Icons.person_outline_rounded,
color: Colors.grey,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0),
),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: Colors.blue, width: 1.0),
borderRadius: BorderRadius.circular(10.0),
),
fillColor: Colors.grey,
hintText: "Referal Name",
//make hint text
hintStyle: TextStyle(
color: Colors.grey,
fontSize: 16,
fontFamily: "verdana_regular",
fontWeight: FontWeight.w400,
),
//create lable
labelText: 'Enter Referal Name',
//lable style
labelStyle: TextStyle(
color: Colors.grey,
fontSize: 16,
fontFamily: "verdana_regular",
fontWeight: FontWeight.w400,
),
),
),
),