Can anyone post a simple example of inverting a Text
placed inside a Container
.
Here is the starting code.
Widget _myWidget() {
return Container(
height: 100.0,
color: Colors.orange,
child: Center(child: Text("GO", style: TextStyle(fontSize: 70.0)),),
);
}
Above code shows following output:
What I want it to look like is :
This is the code to do that
import 'dart:math';
class FlipedText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Material(
child: Transform(
transform:Matrix4.rotationX(pi),
alignment: Alignment.center,
child: Container(
height: 100.0,
color: Colors.orange,
child: Center(child: Text("GO", style: TextStyle(fontSize: 70.0)),),
),
),
);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With