import 'package:base_app/common/common.dart';
import 'package:flutter/material.dart';

class RouteUtil {
  // 去主页
  static void goMain(BuildContext context) {
    pushReplacementNamed(context, BaseConstant.routeMain);
  }

  // 去登录页
  static void goLogin(BuildContext context) {
    pushReplacementNamed(context, BaseConstant.routeLogin);
  }

  static void pushNamed(BuildContext context, String pageName) {
    Navigator.of(context).pushNamed(pageName);
  }

  static void pushReplacementNamed(BuildContext context, String pageName) {
    Navigator.of(context).pushReplacementNamed(pageName);
  }
}
