This repository has been archived on 2023-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
ha_client/lib/cards/media_control_card.dart

27 lines
630 B
Dart
Raw Normal View History

2020-04-25 20:38:21 +03:00
part of '../main.dart';
class MediaControlsCard extends StatelessWidget {
2020-04-27 01:46:37 +03:00
final MediaControlCardData card;
2020-04-25 20:38:21 +03:00
const MediaControlsCard({Key key, this.card}) : super(key: key);
@override
Widget build(BuildContext context) {
2020-04-27 01:46:37 +03:00
if (card.entity.entity.statelessType == StatelessEntityType.missed) {
return EntityModel(
entityWrapper: card.entity,
child: MissedEntityWidget(),
handleTap: false,
);
}
2020-04-25 20:38:21 +03:00
return CardWrapper(
child: EntityModel(
2020-04-27 01:46:37 +03:00
entityWrapper: card.entity,
2020-04-25 20:38:21 +03:00
handleTap: null,
child: MediaPlayerWidget()
)
);
}
}