小部件截断-Flutter

时间:2020-07-03 12:53:48

标签: flutter

我的屏幕上出现截断问题,我相信这是一个容易解决的问题。我正在使用扩展小部件,但不明白为什么它不起作用。有人可以帮我吗?

 _publicPlaylists() {
    Expanded e;
    _playlistDetailsPublics.length != 0 || _publicController.text.isNotEmpty
        ? e = Expanded(
            child: new ListView.builder(
              itemCount: _playlistDetailsPublics.length,
              itemBuilder: (context, index) {
                return _build(_playlistDetailsPublics, index);
              },
            ),
          )
        : e = Expanded(
            child: new Column(
              children: <Widget>[
                Container(
                  //color: Colors.grey[500],
                  child: new Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: new Container(
                      child: new Icon(
                        Icons.search,
                        color: Colors.grey[500],
                        size: 260.0,
                        //semanticLabel: 'Text to announce in accessibility modes',
                      ),
                    ),
                  ),
                ),
                Container(
                  //color: Colors.grey[500],
                  child: new Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Column(
                      children: <Widget>[
                        new Text(
                          AppLocalizations.of(context)
                              .translate('pla:search_message'),
                          style: TextStyle(
                            fontWeight: FontWeight.bold,
                            fontSize: 20.0,
                            color: Colors.grey[500],
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
              ],
            ),
          );
    setState(() {});
    return e;
  }

这些图像说明了我的问题:

enter image description here

enter image description here

0 个答案:

没有答案