小编Den*_*dan的帖子

Flutter 编辑列表项

我的 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”?

dart flutter

8
推荐指数
2
解决办法
2万
查看次数

Flutter删除列表项

我的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..?

提前致谢

dart flutter

5
推荐指数
4
解决办法
1万
查看次数

安装应用程序时创建文件夹

如何在设备存储中创建文件夹来保存文件?

这是将文件下载到设备的代码:

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)

在此处输入图片说明

flutter

1
推荐指数
1
解决办法
4380
查看次数

dart JSON字符串转换为列表字符串

我有一个调用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)

dart flutter

1
推荐指数
2
解决办法
4194
查看次数

ListView 上的 Flutter Stepper

我有疑问,我的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)

dart flutter flutter-layout

0
推荐指数
1
解决办法
2699
查看次数

标签 统计

flutter ×5

dart ×4

flutter-layout ×1