push method

dynamic push(
  1. Widget? widget,
  2. dynamic context
)

Implementation

push(Widget? widget, context) {
  WidgetsBinding.instance!.addPostFrameCallback((_) {
    Navigator.push(context, MaterialPageRoute(builder: (context) => widget!));
  });
}