我最近开始使用飞镖和颤振进行编程,尽管我最近想添加下拉菜单为用户提供多种选择,但我的应用程序运行一直很顺利。一切都按计划进行,但是当我从列表中选择一个值时,它不会更改框中的值,而是返回到提示或一个空框。任何帮助,将不胜感激!
这是我的下拉按钮代码:
Widget buildDropdownButton() {
String newValue;
return new Padding(
padding: const EdgeInsets.all(24.0),
child: new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
new ListTile(
title: const Text('Frosting'),
trailing: new DropdownButton<String>(
hint: Text('Choose'),
onChanged: (String changedValue) {
newValue=changedValue;
setState(() {
newValue;
print(newValue);
});
},
value: newValue,
items: <String>['None', 'Chocolate', 'Vanilla', 'ButterCream']
.map((String value) {
return new DropdownMenuItem<String>(
value: value,
child: new Text(value),
);
}).toList()),
),
],
),
);
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试释放我的apk,只是将com.example包名称更改为我自己的com。[mannamehere]。[appname](在AndroidManifest.xml文件和app / build.gradle文件中),但是现在我的应用程序立即停止工作当我运行它。知道可能是什么问题吗?我还有其他地方需要更改软件包名称吗?我也在使用firebase,并使用新的程序包名称生成了一个新的google-services.json文件。
我刚刚将我的应用程序的图标更改为更新的图标,现在每当我尝试构建和运行该应用程序时,我都会收到以下错误:
Project\build\app\intermediates\manifests\full\debug\AndroidManifest.xml:49: AAPT:
error: resource style/LaunchTheme (aka
com.example.project:style/LaunchTheme) not found.
Run Code Online (Sandbox Code Playgroud)
我使用 flutter_launcher_icon 包来制作图标,我已经尝试了在线提供的解决方案,但似乎没有一个有帮助