Resolves #291 some padding issues

This commit is contained in:
Yegor Vialov 2019-02-16 19:59:39 +02:00
parent e006c4e403
commit 62b1af30e0
4 changed files with 24 additions and 16 deletions

View File

@ -21,10 +21,13 @@ class EntityAttributesList extends StatelessWidget {
} }
}); });
} }
return Column( return Padding(
children: attrs, padding: EdgeInsets.only(bottom: Sizes.rowPadding),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
mainAxisSize: MainAxisSize.min, children: attrs,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
)
); );
} }

View File

@ -6,7 +6,7 @@ class LastUpdatedWidget extends StatelessWidget {
final entityModel = EntityModel.of(context); final entityModel = EntityModel.of(context);
return Padding( return Padding(
padding: EdgeInsets.fromLTRB( padding: EdgeInsets.fromLTRB(
Sizes.leftWidgetPadding, 0.0, 0.0, 0.0), Sizes.leftWidgetPadding, Sizes.rowPadding, 0.0, 0.0),
child: Text( child: Text(
'${entityModel.entityWrapper.entity.lastUpdated}', '${entityModel.entityWrapper.entity.lastUpdated}',
textAlign: TextAlign.left, textAlign: TextAlign.left,

View File

@ -7,6 +7,7 @@ class ModeSwitchWidget extends StatelessWidget {
final double captionFontSize; final double captionFontSize;
final bool value; final bool value;
final bool expanded; final bool expanded;
final EdgeInsets padding;
ModeSwitchWidget({ ModeSwitchWidget({
Key key, Key key,
@ -14,19 +15,23 @@ class ModeSwitchWidget extends StatelessWidget {
@required this.onChange, @required this.onChange,
this.captionFontSize, this.captionFontSize,
this.value, this.value,
this.expanded: true this.expanded: true,
this.padding: const EdgeInsets.only(left: Sizes.leftWidgetPadding, right: Sizes.rightWidgetPadding)
}) : super(key: key); }) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Padding(
children: <Widget>[ padding: this.padding,
_buildCaption(), child: Row(
Switch( children: <Widget>[
onChanged: (value) => onChange(value), _buildCaption(),
value: value ?? false, Switch(
) onChanged: (value) => onChange(value),
], value: value ?? false,
)
],
)
); );
} }

View File

@ -361,10 +361,10 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
HAUtils.launchURL("http://ha-client.vynn.co/"); HAUtils.launchURL("http://ha-client.homemade.systems/");
}, },
child: Text( child: Text(
"ha-client.vynn.co", "ha-client.homemade.systems",
style: TextStyle( style: TextStyle(
color: Colors.blue, color: Colors.blue,
decoration: TextDecoration.underline decoration: TextDecoration.underline