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