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/entity_widgets/entity_name.dart

23 lines
629 B
Dart
Raw Normal View History

2018-10-27 14:27:41 +03:00
part of '../main.dart';
class EntityName extends StatelessWidget {
@override
Widget build(BuildContext context) {
final entityModel = EntityModel.of(context);
return GestureDetector(
child: Padding(
padding: EdgeInsets.only(right: 10.0),
child: Text(
"${entityModel.entity.displayName}",
overflow: TextOverflow.ellipsis,
softWrap: false,
2018-11-12 20:28:10 +02:00
style: TextStyle(fontSize: Sizes.nameFontSize),
2018-10-27 14:27:41 +03:00
),
),
onTap: () =>
entityModel.handleTap
? eventBus.fire(new ShowEntityPageEvent(entityModel.entity))
: null,
);
}
}