当前位置:网站首页>Type 'image' is not a subtype of type 'imageprovider < object > solution
Type 'image' is not a subtype of type 'imageprovider < object > solution
2022-06-27 13:37:00 【Seeking knowledge [email protected]】
problem :
flutter BoxDecoration The error code for setting the page background image is as follows :
decoration:
BoxDecoration( image: DecorationImage(image: _image) ),to image Property specifies that the picture is Image.asset:
get _image => Image.asset('asset/images/loginpageback.jpg');Report errors :
type 'Image' is not a subtype of type 'ImageProvider<Object>resolvent :
hold ImageAsset Change to AssetImage:
image: DecorationImage(
image: AssetImage('asset/images/loginpage/loginpageback.jpg'),
fit: BoxFit.cover
),So that we don't make a mistake
版权声明
本文为[Seeking knowledge [email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202161637133140.html
边栏推荐
猜你喜欢

Vs debugging skills

Openhgnn releases version 0.3

Number of printouts (solved by recursive method)

Does Xinhua San still have to rely on ICT to realize its 100 billion enterprise dream?

Istio微服务治理网格流量管理核心资源控制器详解

How to choose LAN instant messaging software

防火墙基础之华为华三防火墙web页面登录

Realization of hospital medical record management system based on JSP

Summary and Thinking on interface test automation
![[weekly replay] the 81st biweekly match of leetcode](/img/66/03ee4dbb88b0be7486b71cd4059f44.png)
[weekly replay] the 81st biweekly match of leetcode
随机推荐
Summary of basic usage of command line editor sed
基于STM32设计的蓝牙健康管理设备
What else can PLM do?
MySQL 索引及其分类
IJCAI 2022 | greatly improve the effect of zero sample learning method with one line of code. Nanjing Institute of Technology & Oxford proposed the plug and play classifier module
Summary and Thinking on interface test automation
#yyds干货盘点# 解决剑指offer:剪绳子(进阶版)
Half find (half find)
手把手教你搭一个永久运行的个人服务器!
A statistical problem of shell script
Today's sleep quality record 78 points
【周赛复盘】LeetCode第81场双周赛
L June training (day 27) - figure
Number of printouts (solved by recursive method)
Crane: a new way of dealing with dictionary items and associated data
How to use 200 lines of code to implement Scala's Object Converter
crane:字典项与关联数据处理的新思路
抖音实战~公开/私密短视频互转
Centos7 command line installation Oracle11g
Kotlin函数使用示例教程