如何在不滚动的情况下生成文本

时间:2020-05-27 04:12:19

标签: flutter dart

我正在尝试生成text(“ 500g de aveia”)中的文本,我不想生成滚动。有可以执行此操作的小部件吗??? 数据将通过数组从Firebase中获取

enter image description here

 import 'package:flutter/material.dart';

class BoxIngredientes extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Container(
          height: 100,
          child: ListView.builder(
            padding: EdgeInsets.symmetric(horizontal: 15),
            itemCount: 3,
            itemBuilder: (BuildContext context, int index) {
              return Container(
                margin: EdgeInsets.only(
                  top: 5,
                  bottom: 5,
                ),
                child: Row(
                  children: <Widget>[
                    Icon(
                      Icons.supervised_user_circle, // trocar esse icon depois
                      size: 22,
                    ),
                    Container(
                      margin: EdgeInsets.only(
                        left: 10,
                      ),
                      child: Text("500g de aveia"), 
                    )
                  ],
                ),
              );
            },
          ),
        ),
      ],
    );
  }
}

0 个答案:

没有答案