toNamed<T> static method

Future<T?>? toNamed<T>(
  1. String path, {
  2. dynamic arguments,
  3. Map<String, String>? parameters,
})

页面跳转

 传递值,并获取返回值
 var data = await RoutesManager.toNamed(path,);
 if (data == true) {

 }

 新页面获取传递过来的值
 HouseDto house = Get.arguments;
 String id = Get.arguments[Constants.shopId];

 返回值给上一个页面
 RoutesManager.goBack(result: true)

Implementation

static Future<T?>? toNamed<T>(String path,
    {dynamic arguments, Map<String, String>? parameters}) {
  return Get.toNamed(path, arguments: arguments, parameters: parameters);
}