getSizes static method

dynamic getSizes(
  1. GlobalKey<State<StatefulWidget>> key
)

Implementation

static getSizes(GlobalKey key) {
  final RenderBox? renderBox = key.currentContext?.findRenderObject() as RenderBox?;
  final size = renderBox?.size;
  // print("SIZE: $size");
  return [size?.width, size?.height];
}