Почему виджет Hero вызывает проблему с RenderFlex, если у ребенка есть столбец? - PullRequest
0 голосов
/ 31 марта 2020

У меня есть следующий ребенок с тегом Hero

Hero(
                            tag: 'test',
                            child: Container(
                              decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(5),
                                  color: Colors.white,
                                  boxShadow: [
                                    BoxShadow(
                                      color: Colors.black.withOpacity(0.16),
                                      blurRadius: 10,
                                      spreadRadius: 2,
                                      offset: Offset(0, 5),
                                    ),
                                  ]),
                              child: Padding(
                                padding: const EdgeInsets.symmetric(
                                    horizontal: 30, vertical: 20),
                                child: Column(
                                  mainAxisAlignment: MainAxisAlignment.center,
                                  children: <Widget>[
                                    Image.asset('assets/icons/test.png'),
                                    SizedBox(
                                      height: 10,
                                    ),
                                    Text(
                                      'Test',
                                      textAlign: TextAlign.center,
                                      style: TextStyle(color: Colors.blueGrey),
                                    ),
                                  ],
                                ),
                              ),
                            ),
                          ),

Это вызывает RenderFlex проблему:

A RenderFlex overflowed by 18 pixels on the bottom.

Это показывает, что ошибка у ребенка Column

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...