我在Rive上产生了耀斑。但这不是动画。仅显示图像。
class CustomIntro extends StatelessWidget {
@override
Widget build(BuildContext context) {
return
Column(
children: <Widget>[
Expanded(
child: FlareActor(
'assets/introduction.flr',
alignment:Alignment.center,
fit:BoxFit.contain,
animation:"introduction",
)
)
],
);
}
}
答案 0 :(得分:2)
我猜这里的问题是动画名称错误(每个Flare文件都有一些动画名称...)
以下示例:favorite.flr有2个动画名称(“收藏夹+不收藏”)
[start:renderer] @ multi css-hot-loader/hotModuleReplacement ./src/renderer/index.js
[start:renderer] Child html-webpack-plugin for "index.html":
[start:renderer] 1 asset
[start:renderer] Entrypoint undefined = index.html
[start:renderer] [./node_modules/html-loader/dist/cjs.js?minimize=false&url=false!./dist/.renderer-index-template.html] 360 bytes {0} [built]
[start:renderer] Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--6-2!node_modules/rc-tooltip/assets/bootstrap.css:
[start:renderer] Entrypoint mini-css-extract-plugin = *
[start:renderer] [./node_modules/css-loader/dist/cjs.js?!./node_modules/rc-tooltip/assets/bootstrap.css] ./node_modules/css-loader/dist/cjs.js??ref--6-2!./node_modules/rc-tooltip/assets/bootstrap.css 4.22 KiB {mini-css-extract-plugin} [built]
[start:renderer] [./node_modules/css-loader/dist/runtime/api.js] 2.61 KiB {mini-css-extract-plugin} [built]
[start:renderer] Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--8-2!node_modules/sass-loader/dist/cjs.js!src/renderer/account/components/Account/Account.scss:
[start:renderer] Entrypoint mini-css-extract-plugin = *
[start:renderer] [./node_modules/css-loader/dist/cjs.js?!./node_modules/sass-loader/dist/cjs.js!./src/renderer/account/components/Account/Account.scss] ./node_modules/css-loader/dist/cjs.js??ref--8-2!./node_modules/sass-loader/dist/cjs.js!./src/renderer/account/components/Account/Account.scss 368 bytes {mini-css-extract-plugin} [built] [failed] [1 error]
[start:renderer]
[start:renderer] ERROR in ./src/renderer/account/components/Account/Account.scss (./node_modules/css-loader/dist/cjs.js??ref--8-2!./node_modules/sass-loader/dist/cjs.js!./src/renderer/account/components/Account/Account.scss)
[start:renderer] Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
[start:renderer] SassError: Undefined variable: "$responsive-width".
[start:renderer] on line 18 of /<path_to_project>/src/renderer/account/components/Account/Account.scss
[start:renderer] >> @media only screen and (max-width: $responsive-width) {
[start:renderer]
[start:renderer] ---------------------------------------^
[start:renderer] Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--8-2!node_modules/sass-loader/dist/cjs.js!src/renderer/shared/components/Panel/Panel.scss:
[start:renderer] Entrypoint mini-css-extract-plugin = *
[start:renderer] [./node_modules/css-loader/dist/cjs.js?!./node_modules/sass-loader/dist/cjs.js!./src/renderer/shared/components/Panel/Panel.scss] ./node_modules/css-loader/dist/cjs.js??ref--8-2!./node_modules/sass-loader/dist/cjs.js!./src/renderer/shared/components/Panel/Panel.scss 432 bytes {mini-css-extract-plugin} [built] [failed] [1 error]
[start:renderer]
[start:renderer] ERROR in ./src/renderer/shared/components/Panel/Panel.scss (./node_modules/css-loader/dist/cjs.js??ref--8-2!./node_modules/sass-loader/dist/cjs.js!./src/renderer/shared/components/Panel/Panel.scss)
[start:renderer] Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
[start:renderer] SassError: ".panel" failed to @extend "%panelColor".
[start:renderer] The selector "%panelColor" was not found.
[start:renderer] Use "@extend %panelColor !optional" if the extend should be able to fail.
[start:renderer] on line 2 of D:\Development\<path>\src\renderer\shared\components\Panel\Panel.scss
[start:renderer] >> @extend %panelColor;
[start:renderer] ----------^
请更正它,然后重试。
答案 1 :(得分:2)