Fix entity page padding

This commit is contained in:
Yegor Vialov 2019-02-09 02:19:30 +02:00
parent fead6ea348
commit 216fad3cb9
3 changed files with 9 additions and 9 deletions

View File

@ -46,12 +46,9 @@ class _EntityViewPageState extends State<EntityViewPage> {
// the App.build method, and use it to set our appbar title. // the App.build method, and use it to set our appbar title.
title: new Text(_title), title: new Text(_title),
), ),
body: Padding( body: HomeAssistantModel(
padding: EdgeInsets.all(10.0), homeAssistant: widget.homeAssistant,
child: HomeAssistantModel( child: widget.homeAssistant.entities.get(widget.entityId).buildEntityPageWidget(context)
homeAssistant: widget.homeAssistant,
child: widget.homeAssistant.entities.get(widget.entityId).buildEntityPageWidget(context)
)
), ),
); );
} }

View File

@ -162,7 +162,10 @@ class Entity {
return EntityModel( return EntityModel(
entityWrapper: EntityWrapper(entity: this), entityWrapper: EntityWrapper(entity: this),
child: EntityPageContainer(children: <Widget>[ child: EntityPageContainer(children: <Widget>[
DefaultEntityContainer(state: _buildStatePartForPage(context)), Padding(
padding: EdgeInsets.only(top: Sizes.rowPadding),
child: DefaultEntityContainer(state: _buildStatePartForPage(context)),
),
LastUpdatedWidget(), LastUpdatedWidget(),
Divider(), Divider(),
_buildAdditionalControlsForPage(context), _buildAdditionalControlsForPage(context),

View File

@ -1,8 +1,8 @@
part of '../main.dart'; part of '../main.dart';
class Sizes { class Sizes {
static const rightWidgetPadding = 14.0; static const rightWidgetPadding = 16.0;
static const leftWidgetPadding = 8.0; static const leftWidgetPadding = 16.0;
static const buttonPadding = 4.0; static const buttonPadding = 4.0;
static const extendedWidgetHeight = 50.0; static const extendedWidgetHeight = 50.0;
static const iconSize = 28.0; static const iconSize = 28.0;