fix: 修复assets在example app中不能使用的问题 & 加入maven local的链接,修复flutter无法打包 aar的问题
This commit is contained in:
@@ -5,11 +5,14 @@ class RotatingImage extends StatefulWidget {
|
||||
final double size;
|
||||
final Duration duration;
|
||||
|
||||
final String? package; // 添加这个参数
|
||||
|
||||
const RotatingImage({
|
||||
Key? key,
|
||||
required this.imagePath,
|
||||
this.size = 20,
|
||||
this.duration = const Duration(seconds: 3)
|
||||
this.duration = const Duration(seconds: 3),
|
||||
this.package = 'ai_chat_assistant', // 默认值
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -42,7 +45,8 @@ class _RotatingImageState extends State<RotatingImage>
|
||||
child: Image.asset(
|
||||
widget.imagePath,
|
||||
width: widget.size,
|
||||
height: widget.size
|
||||
height: widget.size,
|
||||
package: widget.package, // 使用传入的package参数
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user