lzhuor / auto_size_text_field

Flutter TextField widget that automatically resizes text field to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text_field
MIT License
52 stars 35 forks source link

Prefix text is not taken into textfield width #5

Closed vedartm closed 3 years ago

vedartm commented 3 years ago

When some prefixText is added, textfield area is smaller by the width of prefixText data. In the below example, the textfield is 1 character smaller (because of the dollar symbol prefix text).

    AutoSizeTextField(
      fullwidth: false,
      controller: _priceController,
      onChanged: _cubit.priceChanged,
      keyboardType: TextInputType.number,
      decoration: InputDecoration(
        prefixText: '\$',
        contentPadding: EdgeInsets.zero,
      ),
    )