How to fix the position of the text by resizing the font size according to the device screen size in flutter app?


I have used a BottomAppBar widget and a floatingActionButton, In the picture some letters goes down which doesn’t look instead is there a way to make those font size vary automatically depending on the screen size and remain in the same row?enter image description here


Simply just wrap your Text widget to FittedBox widget like,

   centerTitle: true,
   title: FittedBox(fit:BoxFit.fitWidth, 
   child: Text('This is fitted box test')

Or you can use this lib

Answered By – Cyrus the Great

Answer Checked By – Dawn Plyler (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *