import 'package:flutter/material.dart'; import 'package:get/get.dart'; class RouterUtil { static Future toNamed(String routeName, {arguments}) async { //关闭键盘 if (Get.context != null) { FocusScope.of(Get.context!).requestFocus(FocusNode()); } return await Get.toNamed(routeName, arguments: arguments); } }