Fix panel view scroll issue

This commit is contained in:
Yegor Vialov
2020-05-22 12:54:39 +00:00
parent dbeda6ea68
commit a6d1baca77
2 changed files with 19 additions and 20 deletions

View File

@ -10,15 +10,12 @@ class ViewWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget cardsContainer;
Widget badgesContainer;
if (this.view.isPanel) {
return FractionallySizedBox(
widthFactor: 1,
heightFactor: 1,
child: _buildPanelChild(context),
);
cardsContainer = _buildPanelChild(context);
badgesContainer = Container(width: 0, height: 0);
} else {
Widget cardsContainer;
Widget badgesContainer;
if (this.view.badges != null && this.view.badges is BadgesData) {
badgesContainer = this.view.badges.buildCardWidget();
} else {
@ -50,17 +47,17 @@ class ViewWidget extends StatelessWidget {
} else {
cardsContainer = Container();
}
return SingleChildScrollView(
padding: EdgeInsets.all(0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
badgesContainer,
cardsContainer
],
),
);
}
return SingleChildScrollView(
padding: EdgeInsets.all(0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
badgesContainer,
cardsContainer
],
),
);
}
Widget _buildPanelChild(BuildContext context) {