push method

void push(
  1. Widget? widget,
  2. BuildContext context
)

Implementation

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