Comments (7)
错误信息已经很明确了
from svgaplayer-flutter.
错误信息已经很明确了
dispose 后调用了 stop 不知道为什么会这样,试了很多方法都不行
from svgaplayer-flutter.
错误信息已经很明确了
一个页面有多个 SVGA 就会这样,希望可以优化
from svgaplayer-flutter.
可以给一份有问题的 Demo 代码不?
from svgaplayer-flutter.
可以给一份有问题的 Demo 代码不?
/// 图片优化封装====================================
class ImagePath {
///svga动画
static Widget loadingSVGA() {
return const SizedBox(
width: 20,
height: 20,
child: SvgaAnimat(file: "assets/svga/abc.svga"),
);
}
///下载图片后缓存图片 cached_network_image
static Widget network(String? imageUrl, {Size? size, BoxFit? fit}) {
return imageUrl != null
? CachedNetworkImage(
imageUrl: imageUrl,
width: size?.width ?? double.infinity,
height: size?.height ?? double.infinity,
fit: fit ?? BoxFit.cover,
placeholder: (context, url) {
return SizedBox(
width: size?.width ?? double.infinity,
height: size?.height ?? double.infinity,
child: loadingSVGA(), //使用 SVGA 在图片加载时有一个 loading 的动画
);
},
errorWidget: (context, url, error) => Container(
color: const Color(0xffF1F8FF),
width: size?.width ?? double.infinity,
height: size?.height ?? double.infinity,
child: const Icon(
Icons.image,
color: Color(0xffD3E2F5),
),
),
)
: Container(
color: const Color(0xffF1F8FF),
width: size?.width ?? double.infinity,
height: size?.height ?? double.infinity,
child: const Icon(
Icons.image,
color: Color(0xffD3E2F5),
),
);
}
}
/// 页面应用 ===================================
List<Widget> _likeList() {
// 猜你喜欢
var tiem = hotProductList!.map((val) {
String pic = Setting.serviceUrl + '/' + val.pic!.replaceAll('\\', '/');
return Column(
children: [
Container(
width: ScreenutilSize().width(120.0),
height: ScreenutilSize().height(120.0),
margin: EdgeInsets.only(right: ScreenutilSize().width(20.0)),
child: ImagePath.network(pic), // 后台读取数据 循环出来就会报错
),
SizedBox(
width: ScreenutilSize().width(120.0),
child: Text(
val.title!,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenutilSize().fontSize(20),
),
),
),
],
);
});
return tiem.toList();
}
from svgaplayer-flutter.
同样问题 也是多个svga
from svgaplayer-flutter.
无法重现
from svgaplayer-flutter.
Related Issues (20)
- 2.1.2特殊svga文件显示不了 报bad data HOT 2
- SVGASimpleImage不会刷新 HOT 2
- 加载目录下文件无反应 HOT 1
- Error: Failed to decode image HOT 3
- svga cash HOT 1
- iPhone 12 真机 Crash
- iPhone 12 真机 Crash HOT 3
- 很多web方法怎么实现? HOT 1
- 有些方法flutter 不可以实现嘛? HOT 2
- path_drawing版本过低 HOT 4
- 部分svga解析出错 HOT 1
- svgaplayer_flutter >=2.0.0 depends on path_drawing ^0.5.1 HOT 2
- SVGA文件内部同时有图片和文字替换,请问大佬有办法处理么? HOT 1
- 请问一下要怎么设置只播放一次动画就停止,SVGAAnimationController找了好久没找到方法 HOT 1
- SVGA player doesn't play sound HOT 2
- update path_drawing version
- iphone 14出现一阵一阵的黑屏
- svg overflow screen
- 现在支持播放带音频的svga吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgaplayer-flutter.