我目前依赖于splashscreen 1.2.0软件包的一个Flutter 翼应用程序. 但是backgroundimage变量类型是imageprovider,而我想使用Assets文件夹中的图像.有没有人知道如何传递图像资源文件,以便能够用作imageprovider类型,或者知道如何使用任何其他方式使其工作?
因为与其他属性相比,使用它刚刚加载的imageprovider稍晚一些.
非常感谢!
我try 使用Image.Asset(),但不起作用.
return SplashScreen(
seconds: 5,
navigateAfterSeconds: AppRoute,
title: Text('Welcome', style: AppTextStyle),
image: Image.asset(AppAsset.logo),
photoSize: AppScreen,
imageBackground: Image.asset(AppAsset.background),
loaderColor: AppColor,
loadingText: Text('Loading'),
styleTextUnderTheLoader: AppTextStyle,
onClick: () {},
);
期望能够使用Image.sets,但它仅适用于网络映像.