replace method
Use this function to replace a page from one page using named routes.
Implementation
replace({required String name}) {
if(_navigationKey.currentState != null) {
Navigator.pushReplacementNamed(_navigationKey.currentState!.context,name);
} else{
kLog("No Navigation State found!",logStatus: LogStatus.ERROR);
}
}