Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: How to flip an icon to get mirror effect?

I want to flip this replay material icon so that it can be used as forward.

Present Icon:

Preset Icon

Required Result:

enter image description here

like image 298
Michael Hathi Avatar asked Sep 22 '19 07:09

Michael Hathi


People also ask

How do I rotate an image in flutter?

Create a new dart file called rotated_demo. dart inside the lib folder. In the body, we will implement a RotatedBox() widget. Inside the widget, we will add a quarterTurns means the number of clockwise quarter turns should rotate the child.


1 Answers

Before:

enter image description here


After:

enter image description here

import 'dart:math' as math; // import this  Transform(   alignment: Alignment.center,   transform: Matrix4.rotationY(math.pi),   child: Icon(Icons.rotate_left, size: 100,), ) 
like image 82
CopsOnRoad Avatar answered Sep 19 '22 15:09

CopsOnRoad