简体   繁体   English

导航器错误在颤振导航器错误参数类型'JsObject'不能分配给参数类型'BuildContext'

[英]navigator error in flutter navigator error The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext'

Future<void> gotologin() async {
    await Future.delayed(
      Duration(seconds: 3),
    );
    Navigator.of(context).push(  // <- The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext'
      MaterialPageRoute(
        builder: (context) => Login(),
      ),
    );
  }

在此处输入图像描述

Your are having another variable of type JsObject that is named Context , try to rename that variable and try again or you can past the full page code and I will be happy to help you with it !您有另一个名为 Context 的 JsObject 类型的变量,请尝试重命名该变量并重试,或者您可以跳过整页代码,我很乐意为您提供帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法将参数类型“JsObject”分配给参数类型“BuildContext” - Error: The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext' 参数类型“JsObject”不能分配给参数类型“BuildContext”。 - flutter - The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext'. - flutter Flutter Navigator“无法将参数类型&#39;Context&#39;分配给参数类型&#39;BuildContext&#39;” - Flutter Navigator “argument type 'Context' can't be assigned to the parameter type 'BuildContext'” 出现错误“无法将参数类型‘JsObject’分配给参数类型‘BuildContext’” - Getting error "The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext'" 无法将参数类型“ JsObject”分配给参数类型“ BuildContext” - The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext 参数类型“JsObject”不能分配给参数类型“BuildContext”。dart - The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext'.dart 参数类型“JsObject”不能分配给参数类型“BuildContext” - The argument type 'JsObject' can't be assigned to the parameter type 'BuildContext' 无法将参数类型“jsObject”分配给“buildContext”参数? - The argument type 'jsObject' can't be assigned to 'buildContext' parameter? 错误:无法将参数类型“Context”分配给参数类型“BuildContext” - error: The argument type 'Context' can't be assigned to the parameter type 'BuildContext' 错误:无法将参数类型“Context”分配给参数类型“BuildContext” - Error : The argument type 'Context' can't be assigned to the parameter type 'BuildContext'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM