pushReplacement<T extends Object?, TO extends Object?> method

Future<T?> pushReplacement<T extends Object?, TO extends Object?>(
  1. Widget toPage,
  2. TO? result
)

Implementation

Future<T?> pushReplacement<T extends Object?, TO extends Object?>(
  Widget toPage,
  TO? result,
) async {
  return await Navigator.pushReplacement<T, TO>(
    this,
    MaterialPageRoute<T>(
      builder: (_) => toPage,
    ),
    result: result,
  );
}