Reputation: 151
i am capturing an image by camera and want to flip that image as i show in sample picture of Giraffe.
Upvotes: 4
Views: 2925
Reputation: 2937
With Flutter 3.10.2 and above versions (Don't know about the previous versions have this), you can flip as below:
Transform.flip(
flipX: true, // Flip horizontally
flipY: true, // Flip vertically
child: Your widget,
)
Upvotes: 1
Reputation: 5052
Use Transform
and give the image as child,
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(math.pi),
child: Image.network('https://i.sstatic.net/VroJR.png'),
)
Upvotes: 5