scrollToTop method Null safety

void scrollToTop()

Implementation

void scrollToTop() {
  if (controller.offset == 0.0) {
    controller.jumpTo(-200);
  } else {
    print('Scrool to top');
    controller.animateTo(0.0,
        curve: Curves.easeOut, duration: const Duration(milliseconds: 300));
  }
}