pushNamed method Null safety

dynamic pushNamed(
  1. String route,
  2. {Object? args}
)

Implementation

pushNamed(String route, {Object? args}) {
  if (route.isEmpty) return;

  Navigator.pushNamed(this, route, arguments: args);
}