Good day! i’m trying to put an inline button on the text field for my "get a code" function but no success. i tried to search for some tutorials but never met or found what i’m looking for. i’m using vscode for my IDE.
[Get a Code button] [1]: https://i.stack.imgur.com/pPhiP.pnghere’s my code for that particular text field:
const SizedBox(height: 10),
TextField(
decoration: InputDecoration(
hintText: "Code",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(30),
borderSide: BorderSide.none),
fillColor: Colors.grey.withOpacity(0.3),
filled: true,
prefixIcon: const Icon(Icons.code)),
obscureText: true,
),
2
Answers
You could assign any widget to suffix property.
You could use
InkWell, Gesturedetector, TextButton()
I’m Try To solve Your Problem :
Here is Code