toFinish static method

dynamic toFinish(
  1. BuildContext context,
  2. String routeName, {
  3. dynamic arguments,
})

Navigate screen and remove current screen

Implementation

static toFinish(BuildContext context, String routeName, {dynamic arguments}) {
  Navigator.pushReplacementNamed(context, routeName, arguments: arguments);
}