小编All*_*nzo的帖子

我可以在没有苹果开发者帐户的真实苹果设备上测试我的 Flutter 应用程序,如果可以,我该怎么做?

我已阅读以下SO 问题文章。第一个 SO 问题说我需要有一个苹果开发者帐户才能在真正的 IOS 设备上测试我的应用程序,但是我认为获得一个苹果开发者帐户的 100 美元投资不值得。所以文章指出我可以使用 xcode 部署它,但文章是针对 Ionic 用户的。但是,我不是 Ionic 开发人员,而是 Flutter 开发人员。

我想知道的是文章是否适用于Flutter,是否最低iOS 9.0版本。任何帮助将不胜感激谢谢!

ios dart flutter

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

如何删除 List<MyDataModel> 的重复项(Dart/Flutter)

我有一个基于列表构建 UI 的 futurebuilder,它完成了这项工作,但是由于每当我导航时一次又一次地构建 UI,我会得到重复的内容。我的问题是,Dart 中是否有一种固有的方法可以从列表中删除重复项?我已经尝试过这个StackOverflow 问题,但它不起作用。

这是我的定制模型:

class HomeList {
  Widget navigateScreen;
  String imagePath;
  PatientInfo patientInfo;

  HomeList({
    this.navigateScreen,
    this.imagePath = '',
    this.patientInfo,
  });

  static List<HomeList> homeList = [];
}

Run Code Online (Sandbox Code Playgroud)

这是我从 cloud_firestore 获取数据的 futureBuilder 函数:

  _getPatients() async {
    if (didLoadpatients == 0) {
      print('this is didloadpatients at start of func $didLoadpatients');
      var document = await db
          .collection('users')
          .document(mUser.uid)
          .collection('patients');

      document.getDocuments().then((QuerySnapshot query) async {
        query.documents.forEach((f) {
          uids.add(f.data['uID']);
        });
        didLoadpatients++;
      print('this is didloadpatients at end of func $didLoadpatients');
        for (var …
Run Code Online (Sandbox Code Playgroud)

list dart flutter

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

将长文本包装到容器中,导致 Flutter 溢出

我正在为我的应用程序创建一个通知中心,它包含一些标题和正文的长字符串,它总是导致溢出,我尝试使用扩展小部件,以及以下堆栈溢出问题:问题 1 ,问题 2但我不能将它应用到我的代码中,现在它是这样的:

在此处输入图片说明

我从我的 firebase cloud firestore 获取文本,并使用列表视图输出文本。

标题文字是这样的:“艾伦Indefenzo已取消同意您访问他/她的数据”
正文是这样的:“他/她已经删除了所有的访问,您将不再能够查看/修改他的数据,再次访问要求用户再次向您提供他/她的特殊代码。”

这是我的代码:

Container(
        color: Colors.white,
        child: StreamBuilder(
          stream: db
              .collection('users')
              .document(userData.userID)
              .collection('notifications')
              .snapshots(),
          builder: (BuildContext context, AsyncSnapshot snapshot) {
            if (!snapshot.hasData) {
              return Center(
                child: CircularProgressIndicator(),
              );
            }
            if (snapshot.data.documents.length != 0) {
              return ListView.builder(
                itemCount: snapshot.data.documents.length,
                itemBuilder: (BuildContext context, int index) {
                  return Container(
                    child: Row(
                      children: <Widget>[
                        Container(
                          height: 150,
                          width: 100,
                          child: Image(
                            image: NetworkImage(
                                snapshot.data.documents[index]['dpURL']), fit: BoxFit.contain,
                          ),
                        ), …
Run Code Online (Sandbox Code Playgroud)

overflow dart flutter

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

标签 统计

dart ×3

flutter ×3

ios ×1

list ×1

overflow ×1