Is there a way to create a text field with a prefix that is always visible in flutter

UPDATE: We can now override the minimum padding of prefixIcon AND suffixIcon with prefixIconConstraints.

We can use prefixIcon instead of prefixText. Since prefixIcon accepts any widget, we can use prefixIcon: Text("$").

Here is an example:

InputDecoration(
   isDense: true,
   prefixIcon:Text("\$"),
   prefixIconConstraints: BoxConstraints(minWidth: 0, minHeight: 0),
),

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)