Show error when media_player is not media_player

This commit is contained in:
Yegor Vialov
2020-05-02 08:50:21 +00:00
parent 0996fb94da
commit 96c8338890
4 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,23 @@
part of '../main.dart';
class ErrorEntityWidget extends StatelessWidget {
final String text;
ErrorEntityWidget({
Key key, this.text
}) : super(key: key);
@override
Widget build(BuildContext context) {
final EntityModel entityModel = EntityModel.of(context);
String errorText = text ?? "Entity error: ${entityModel.entityWrapper.entity?.entityId}";
return Container(
child: Padding(
padding: EdgeInsets.all(5.0),
child: Text(errorText),
),
color: Theme.of(context).errorColor,
);
}
}