Below is my simple example. After press the button, the container's position will change. Are there any methods to print the container's new position of dx and dy automatically after press the button?
class Data extends StatefulWidget {
DataState createState() => DataState();
}
class DataState extends State<Data> {
double height = 10.0;
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.add),
onPressed: () {
setState(() {
height += 10.0;
});
},
),
),
body: Column(
children: [
SizedBox(
height: height,
),
Container(
color: Colors.red,
height: 25
)
],
));
}
}