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
51 stars 34 forks source link

Size does not calculate correctly when containing prefix #25

Open GabrieleSuzart opened 3 years ago

GabrieleSuzart commented 3 years ago

Problem

When I set a prefix, with fullwidth: false, the width doesn't consider the length of the prefix.

Code

return AutoSizeTextField(
  controller: controller,
  maxLines: 1,
  fullwidth: false,
  decoration: InputDecoration(
    prefix: Text('R\$'),
  ),
);

Expected

The calculated width is added to the width of the prefix

Version

auto_size_text_field: ^1.0.0-nullsafety.1

Record

https://user-images.githubusercontent.com/30198542/127194092-3e5b73fe-b330-4141-889f-6a8c1bd8b10a.mov

lzhuor commented 2 years ago

Thank you @GabrieleSuzart ! I will take a look.