Flutter auto-fit text size sample code

2022/08/07 21:26

Just wrap thee text widget within a SizedBox. Also, you MUST assign the width and height atrributes.

SizedBox(
  width: 50,
  height:60,
  child: const TextField(
    obscureText: false,
    decoration: InputDecoration(
      border: OutlineInputBorder(),
      labelText: 'my text',
    ),
  ),
),

 

 

声明:未经允许不得进行商业转载,非商业转载请注明出处和链接。

Leave a Reply

Back to top