mobile_skt/lib/util/router.util.dart

13 lines
351 B
Dart

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