Home > Mobile >  How to use textscalefactor in textformfield in flutter to restrict text size?
How to use textscalefactor in textformfield in flutter to restrict text size?

Time:01-04

textScaleFactor : -

textScaleFactor: 1.0

How to use TextFormField in flutter to fix text size for all type of resolution ?

CodePudding user response:

Wrap your TextFormField with MediaQuery like so.

MediaQuery(
    data: const MediaQueryData(textScaleFactor: 2.0),
    child: TextFormField(),
),
  • Related