replaceScreen<T, TO> function Null safety

Future<T?> replaceScreen<T, TO>(
  1. BuildContext context,
  2. Widget screen
)

Implementation

Future<T?> replaceScreen<T, TO>(BuildContext context, Widget screen) => Navigator.pushReplacement<T, TO>(context, MaterialPageRoute(builder: (context) => screen));