Flutter 问题:颤振图标没有出现在我的应用程序上?(仅在我的电脑上)
我想知道为什么在编译应用程序时图标不会出现在应用程序中 我看了一遍,但没有找到答案。 但解决这个问题对我没有帮助 注意:代码可以在我同事的PC上编译并正常工作,但我不能 我的代码如下所示:Flutter 问题:颤振图标没有出现在我的应用程序上?(仅在我的电脑上),flutter,icons,Flutter,Icons,我想知道为什么在编译应用程序时图标不会出现在应用程序中 我看了一遍,但没有找到答案。 但解决这个问题对我没有帮助 注意:代码可以在我同事的PC上编译并正常工作,但我不能 我的代码如下所示: Positioned( top: _top, left: 30, right: 30, child: Row(mainAxisAlignment: MainAxisAlignment.center, children: < Wid
Positioned(
top: _top,
left: 30,
right: 30,
child:
Row(mainAxisAlignment: MainAxisAlignment.center, children: <
Widget>[
Container(
width: _btn1w,
height: _btn1h,
child: Column(
children: <Widget>[
RawMaterialButton(
onPressed: () async {
},
child: new Icon(
Icons.person_add,
color: Colors.blue,
size: 85.0,
),
shape: new CircleBorder(),
elevation: 2.0,
fillColor: Colors.grey[200],
padding: const EdgeInsets.all(15.0),
),
Container(
margin: EdgeInsets.only(top: 10),
child: Text(
'Register',
style: TextStyle(
fontSize: 17,
color: Colors.blueAccent,
fontWeight: FontWeight.bold,
),
),
),
],
)),
Container(
width: _btn2w,
height: _btn2h,
margin: EdgeInsets.only(left: _margin),
child: Column(
children: <Widget>[
RawMaterialButton(
onPressed: () async {
//
_margin = 0;
},
child: new Icon(
Icons.vpn_key,
color: Colors.blue,
size: 85.0,
),
shape: new CircleBorder(),
elevation: 2.0,
fillColor: Colors.grey[200],
padding: const EdgeInsets.all(15.0),
),
Container(
margin: EdgeInsets.only(top: 10),
child: Text(
'Login',
style: TextStyle(
fontSize: 17,
color: Colors.blueAccent,
fontWeight: FontWeight.bold,
),
),
),
],
),
),),
定位(
顶部:_顶部,
左:30,,
右:30,,
儿童:
行(mainAxisAlignment:mainAxisAlignment.center,子项:<
小部件>[
容器(
宽度:_btn1w,
高度:_btn1h,
子:列(
儿童:[
原材料按钮(
onPressed:()异步{
},
孩子:新图标(
Icons.person\u添加,
颜色:颜色,蓝色,
尺寸:85.0,
),
形状:新的CircleBorder(),
标高:2.0,
fillColor:Colors.grey[200],
填充:常数边集全部(15.0),
),
容器(
页边空白:仅限边集(前10页),
子:文本(
"登记册",,
样式:TextStyle(
尺寸:17,
颜色:Colors.blueAccent,
fontWeight:fontWeight.bold,
),
),
),
],
)),
容器(
宽度:_btn2w,
高度:_btn2h,
边距:仅限边集(左:_边距),
子:列(
儿童:[
原材料按钮(
onPressed:()异步{
//
_保证金=0;
},
孩子:新图标(
Icons.vpn_键,
颜色:颜色,蓝色,
尺寸:85.0,
),
形状:新的CircleBorder(),
标高:2.0,
fillColor:Colors.grey[200],
填充:常数边集全部(15.0),
),
容器(
页边空白:仅限边集(前10页),
子:文本(
“登录”,
样式:TextStyle(
尺寸:17,
颜色:Colors.blueAccent,
fontWeight:fontWeight.bold,
),
),
),
],
),
),),
您提到的同事
您可以检查添加在pubspec.yaml
中的资产,并检查包含在pubspec.yaml
中的所有文件是否存在于您的PC上。可能他/她忘记将其添加到版本控制器中
例如:
assets:
- assets/img/logo.png
已添加,但在img
文件夹中找不到logo.png
。
在这种情况下,flatter
编译您的项目,但是图标将丢失
我们也有同样的问题。@Mobina我不知道怎么做,但这是个问题。我几乎可以肯定他的问题是资产流失。Tnx,你救了我的命❤️当然,但我想知道为什么会这样@A1Gard@Mobina这是一个链接资产的问题,当一个或一些资产丢失,然后忽略其他资产。我没有足够的时间公关,你可以公关它。