How can we edit the children of this widget in a widget that we use transform scale?
Code:
Transform.rotate(
angle: math.pi / 4,
child: Container(
height: 100,
width: 100,
color: const Color(0xff565758),
child: const Text("Lorem ipsum"),
),
),
Tried transform, transform.scale, FittedBox widgets. And the result is as in the picture above.
Solve:
Stack(
children: [
Transform.rotate(
angle: math.pi / 4,
child: Container(
height: 100,
width: 100,
color: const Color(0xff565758),
),
),
const Positioned.fill(child: Align(alignment: Alignment.center, child: Text("Lorem ipsum")))
],
),
Aucun commentaire:
Enregistrer un commentaire