mirrored_repositories/Maktapty_Books_App/lib/core
import 'package:flutter/material.dart';

void navigateToDetail(context, Widget widget) {
  Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => widget,
    ),
  );
}

//
void navigateToAndRemove(context, Widget widget) {
  Navigator.pushAndRemoveUntil(
    context,
    MaterialPageRoute(
      builder: (context) => widget,
    ),
    (route) => false,
  );
}

void navigatePop(context) {
  Navigator.pop(context);
}
