简体   繁体   English

flutter中如何使用sip_ua?导致50个错误

[英]How to use sip_ua in flutter?Causes 50 errors

I installed sip_ua pod in my flutter application.我在我的 flutter 应用程序中安装了 sip_ua pod。 https://pub.dev/packages/sip_ua#-installing-tab- When I open the project in visual studio it shows more than 50 errors.I am new to flutter.I have no idea how to clear my errors.Please anyone help me. https://pub.dev/packages/sip_ua#-installing-tab-当我在 Visual Studio 中打开项目时,它显示超过 50 个错误。我是 flutter 的新手。我不知道如何清除我的错误。请任何人帮我。

在此处输入图像描述

在此处输入图像描述

I am having these types of errors.Please help me.我有这些类型的错误。请帮助我。

The problem is that you have defined your own class IncomingMessage and that's clashing with the library's version.问题是您已经定义了自己的 class IncomingMessage并且与库的版本冲突。 You could either rename your class, or (as it says in the error message) import the library with a prefix.您可以重命名 class,或者(如错误消息中所述)导入带有前缀的库。

import 'package:sip_ua/sip_ua.dart' as ua;
//
// now the library's version will be ua.IncomingMessage and won't clash with yours

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM