How to rotate text in flutter?

This Article is posted by seven.srikanth at 10/2/2021 7:52:19 AM



<p>Here is an example of how to rotate text in flutter. We are going to use RotatedBox widget to achieve this.</p> <p>![](https://fluttercentral.com/Uploads/075f1adf-7c28-46f2-9f93-c5dc072baa25.pngwidth="50%height="auto](</p> <p>You can experiment more by updating quarterTurns value. It will just rotate more.</p> <p>Here is the complete code.</p> <p id="4ec9b0;](MyApp());" color:="">color: #9cdcfe;](args) </p> <p>color: #569cd6;](class color: #4ec9b0;](MyApp color: #569cd6;](extends color: #4ec9b0;](StatelessWidget { color: #9cdcfe;](@ color: #9cdcfe;](override</p> <p>color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext color: #9cdcfe;](context) { color: #c586c0;](return color: #4ec9b0;](MaterialApp( color: #9cdcfe;](home: color: #4ec9b0;](Scaffold(color: #9cdcfe;](body: color: #4ec9b0;](MyHomePage()), ); } }</p> <p>color: #569cd6;](class color: #4ec9b0;](MyHomePage color: #569cd6;](extends color: #4ec9b0;](StatelessWidget { color: #9cdcfe;](@ color: #9cdcfe;](override</p> <p>color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext color: #9cdcfe;](context) { color: #c586c0;](return color: #4ec9b0;](Center( color: #9cdcfe;](child: color: #4ec9b0;](RotatedBox( color: #9cdcfe;](quarterTurns: color: #b5cea8;](3, color: #9cdcfe;](child: color: #4ec9b0;](Text( color: #ce9178;]('Hello World!', color: #9cdcfe;](style: color: #4ec9b0;](TextStyle(color: #9cdcfe;](fontSize: color: #b5cea8;](50), ), ), ); } } ` Thanks,Srikanth</p>


Tags: Rotate text; invert text;








0 Comments
Login to comment.
Recent Comments