Compiler message:
lib/main.dart:77:32: Error: 'Toast' is imported from both
'package:easy_alert/src/provider.dart' and
'package:fluttertoast/fluttertoast.dart'.
toastLength: Toast.LENGTH_LONG);

由于引用的"Toast"同时存在于package  easy_alertfluttertoast中,编译器不确定到底是引用的哪一个包中的Toast,因此报错。

解决方法:

import 'package:easy_alert/easy_alert.dart' as easyAlertV;
import 'package:fluttertoast/fluttertoast.dart' as flutterToastV;

然后

flutterToastV.Fluttertoast.showToast(msg: "数据存储成功",
toastLength: flutterToastV.Toast.LENGTH_SHORT,
gravity: flutterToastV.ToastGravity.BOTTOM,
timeInSecForIos: 1
);

原文参考我的Stackoverflow https://stackoverflow.com/questions/53359139/error-toast-is-imported-from-both-packageeasy-alert-src-provider-dart-and

Flutter - Error: 'xxx' is imported from both package...的更多相关文章

  1. jdk1.7升级到jdk1.8后出错: [ERROR] javadoc: warning - Multiple sources of package comments found for package

    from: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html [ERROR] javadoc: warnin ...

  2. Android Studio报错 Error: A library uses the same package as this project

    今天在导入一个项目的时候,as报错 Error: A library uses the same package as this project 经过百度Google 发现解决办法:在modules的 ...

  3. 7za命令报错Error: xxx is not supported archive

    问题: 执行7za命令时报错:Error: xxx is not supported archive   原因: 当前7za版本过低   直接执行7za可以看到当前版本: 7-Zip (A) [64] ...

  4. YUM安装MONGODB发生Error in PREIN scriptlet in rpm package mongodb-enterprise-server-4.0.2-1.el6.x86_64错误

    YUM安装MONGODB发生Error in PREIN scriptlet in rpm package mongodb-enterprise-server-4.0.2-1.el6.x86_64错误 ...

  5. file / from install of XXX conflicts with file from package filesystem-XXX

    在centos上安装一个偏门软件时出现如下问题: rpm -ivh mNetAssist-0.1.1-2.x86_64.rpm #执行命令 file / from install of XXX con ...

  6. update-rc.d: error: XXX Default-Start contains no runlevels, aborting.

    root@hm-saas-db:/etc/init.d# update-rc.d confluence disable update-rc.d: error: confluence Default-S ...

  7. Android studio 使用flutter插件 运行第一个flutter项目 报错 Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.

    在Android studio中新建了flutter项目.运行报错licence not accepted. Warning: License for package Android SDK Buil ...

  8. 6、Flutter Error waiting for a debug connection: ProcessException: adb did not report f(转)

    1.错误信息 Error waiting for a debug connection: ProcessException: adb did not report forwarded port 2.解 ...

  9. Qt error ------ 'XXX' has not been declared

    1.头文件没加 2.调用函数者的头文件在XXX头文件的下方

随机推荐

  1. Spring @Autowired注解在非Controller/Service中注入为null

    参考:https://blog.csdn.net/qq_35056292/article/details/78430777 问题出现: 在一个非controller/service类中,我需要注入Co ...

  2. php实现动态随机验证码机制(CAPTCHA)

    php实现动态随机验证码机制 验证码(CAPTCHA)是“Completely Automated Public Turing test to tell Computers and Humans Ap ...

  3. SGU---102 欧拉函数

    题目链接: https://cn.vjudge.net/problem/SGU-102#author=0 题目大意: 求解小于等于N的且与N互质的数字有多少个 解题思路: 直接求欧拉函数即可 关于欧拉 ...

  4. CentOS 7.4 yum安装LAMP环境

    配置防火墙,开启80.3306端口.CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. #停止firewall服务 systemctl stop firewa ...

  5. 1818: [Cqoi2010]内部白点

    Time Limit: 10 Sec Memory Limit: 64 MB Submit: 1394 Solved: 625 [Submit][Status][Discuss] Descriptio ...

  6. ASP.NET web api 跨域请求

    1.学习文章:AJAX 跨域请求 - JSONP获取JSON数据 1.asp.net代码 参考文章:http://www.sxt.cn/info-2790-u-756.html (1).增加CorsH ...

  7. Hadoop学习之路(十一)HDFS的读写详解

    HDFS的写操作 <HDFS权威指南>图解HDFS写过程 详细文字说明(术语) 1.使用 HDFS 提供的客户端 Client,向远程的 namenode 发起 RPC 请求 2.name ...

  8. Solr服务在Linux上的搭建详细教程

    一.系统环境 注:欢迎大家转载,非商业用途请在醒目位置注明本文链接和作者名dijia478即可,商业用途请联系本人dijia478@163.com. CentOS-6.7-i386-bin-DVD1 ...

  9. saltstack之编写自定义模块

    编写自己的模块 1 默认会放在/srv/salt/_modules vi hello.py """ CLI Example : salt '*' hello.world ...

  10. springboot不使用内置tomcat启动,用jetty或undertow

    Spring Boot启动程序通常使用Tomcat作为默认的嵌入式服务器.如果需要更改 - 您可以排除Tomcat依赖项并改为包含Jetty或Undertow: jetty配置: <depend ...