我的 flutter dart 脚本中有一个问题,这是我的脚本:
List<ReplyTile> replytile = new List<ReplyTile>();
replytile.add(
new ReplyTile(
member_photo: "photo",
member_id: "001",
date: "01-01-2018",
member_name: "Denis",
id: "001",
text: "hallo.."
)
);
Run Code Online (Sandbox Code Playgroud)
我的问题是:如何在 id = 001.. 的 List 上编辑项目“member_name”?
我的flartter dart脚本中有一个问题,这是我的脚本:
List<ReplyTile> replytile = new List<ReplyTile>();
replytile.add(
new ReplyTile(
member_photo: "photo",
member_id: "001",
date: "01-01-2018",
member_name: "Denis",
id: "001",
text: "hallo.."
)
);
Run Code Online (Sandbox Code Playgroud)
我的问题是:如何删除上的项目List<ReplyTile>有id = 001..?
提前致谢
如何在设备存储中创建文件夹来保存文件?
这是将文件下载到设备的代码:
import 'package:flutter_downloader/flutter_downloader.dart';
onTap: () async { //ListTile attribute
Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;
final taskId = await FlutterDownloader.enqueue(
url: 'http://myapp/${attach[index]}',
savedDir: '/sdcard/myapp',
showNotification: true, // show download progress in status bar (for Android)
clickToOpenDownloadedFile: true, // click on notification to open downloaded file (for Android)
);
},
Run Code Online (Sandbox Code Playgroud)
我有一个调用json字符串数组的API,如下所示:
[
"006.01.01",
"006.01.01 1090",
"006.01.01 1090 1090.950",
"006.01.01 1090 1090.950 052",
"006.01.01 1090 1090.950 052 A",
"006.01.01 1090 1090.950 052 A 521219",
"006.01.01 1090 1090.950 052 A 521219",
"006.01.01 1090 1090.950 052 A 521219",
"006.01.01 1090 1090.950 052 A 521219",
"006.01.01 1090 1090.950 052 A 521219",
"006.01.01 1090 1090.950 052 B",
"006.01.01 1090 1090.950 052 B 521211",
"006.01.01 1090 1090.950 052 B 521211",
"006.01.01 1090 1090.994",
"006.01.01 1090 1090.994 001",
"006.01.01 1090 1090.994 001 A",
"006.01.01 1090 1090.994 001 …Run Code Online (Sandbox Code Playgroud) 我有疑问,我的listView中有一个Stepper,但它甚至无法滚动,我尝试了三天,但没有结果,为什么会发生这种情况以及如何解决?
有人可以帮我解决这个问题吗?
这是我的代码,
new ListView( padding: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 3.0), children: <Widget>[
new ListTile(
title: new Text(
"Day 1",
style: new TextStyle(fontSize: 20.0, color: Colors.lightGreen, fontWeight: FontWeight.bold,fontFamily: 'GoogleSans'),
),
subtitle: new Stepper(
currentStep: this._currentStep1,
onStepTapped: (step){
setState(() {
this._currentStep1 = step;
});
},
onStepContinue: (){
setState(() {
if(this._currentStep1 < 4){
this._currentStep1 += 1;
} else {
//logika jika komplit
}
});
},
onStepCancel: (){
setState(() {
if(this._currentStep1 > 0){
this._currentStep1 -= 1;
} else {
this._currentStep1 = 0;
}
}); …Run Code Online (Sandbox Code Playgroud)