This commit is contained in:
Yegor Vialov 2018-12-14 16:57:11 +02:00
parent 3815800e32
commit be560769ef

View File

@ -150,24 +150,33 @@ class CardWidget extends StatelessWidget {
} }
Widget _buildMediaControlsCard(BuildContext context) { Widget _buildMediaControlsCard(BuildContext context) {
return Card( if (card.linkedEntityWrapper == null || card.linkedEntityWrapper.entity == null) {
child: EntityModel( return Container(width: 0, height: 0,);
entityWrapper: card.linkedEntityWrapper, } else {
handleTap: null, return Card(
child: MediaPlayerWidget() child: EntityModel(
) entityWrapper: card.linkedEntityWrapper,
); handleTap: null,
child: MediaPlayerWidget()
)
);
}
} }
Widget _buildEntityButtonCard(BuildContext context) { Widget _buildEntityButtonCard(BuildContext context) {
card.linkedEntityWrapper.displayName = card.name?.toUpperCase() ?? card.linkedEntityWrapper.displayName.toUpperCase(); if (card.linkedEntityWrapper == null || card.linkedEntityWrapper.entity == null) {
return Card( return Container(width: 0, height: 0,);
child: EntityModel( } else {
entityWrapper: card.linkedEntityWrapper, card.linkedEntityWrapper.displayName = card.name?.toUpperCase() ??
child: ButtonEntityContainer(), card.linkedEntityWrapper.displayName.toUpperCase();
handleTap: true return Card(
) child: EntityModel(
); entityWrapper: card.linkedEntityWrapper,
child: ButtonEntityContainer(),
handleTap: true
)
);
}
} }
Widget _buildUnsupportedCard(BuildContext context) { Widget _buildUnsupportedCard(BuildContext context) {