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/entities/entity_page_layout.widget.dart

37 lines
1.0 KiB
Dart
Raw Normal View History

2019-09-14 19:07:21 +03:00
part of '../main.dart';
2019-09-14 19:53:39 +03:00
class EntityPageLayout extends StatelessWidget {
2019-09-14 19:07:21 +03:00
final Entity entity;
EntityPageLayout({Key key, this.entity}) : super(key: key);
2019-09-14 19:07:21 +03:00
@override
Widget build(BuildContext context) {
return EntityModel(
2019-09-14 19:53:39 +03:00
entityWrapper: EntityWrapper(entity: entity),
2019-09-14 19:07:21 +03:00
child: ListView(
padding: EdgeInsets.all(0),
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: Sizes.rowPadding, left: Sizes.leftWidgetPadding),
2019-09-14 19:53:39 +03:00
child: DefaultEntityContainer(state: entity._buildStatePartForPage(context)),
2019-09-14 19:07:21 +03:00
),
LastUpdatedWidget(),
Divider(),
2019-09-14 19:53:39 +03:00
entity._buildAdditionalControlsForPage(context),
2019-09-14 19:07:21 +03:00
Divider(),
SpoilerCard(
title: "State history",
body: EntityHistoryWidget(),
),
SpoilerCard(
title: "Attributes",
body: EntityAttributesList(),
),
2019-09-14 19:07:21 +03:00
]
),
handleTap: false,
);
}
}