push function

dynamic push(
  1. BuildContext context,
  2. dynamic destination, {
  3. bool withAnimation = true,
})

Implementation

push(BuildContext context, dynamic destination, {bool withAnimation = true}) {
  if (destination is Widget) {
    return _pushWidget(context, destination, withAnimation: withAnimation);
  }
  if (destination is Route) {
    return _pushRoute(context, destination);
  }
}