goToReplace function

dynamic goToReplace(
  1. dynamic context,
  2. dynamic className
)

Implementation

goToReplace(context, className) {
  Navigator.pushReplacement(
      context, MaterialPageRoute(builder: (context) => className));
}