Small screens support

This commit is contained in:
Yegor Vialov 2018-11-23 18:16:38 +02:00
parent f41c9f9197
commit fc8f2f200f
2 changed files with 16 additions and 6 deletions

View File

@ -79,11 +79,13 @@ class MediaPlayerWidget extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image( Flexible(
image: CachedNetworkImageProvider("$homeAssistantWebHost${entity.entityPicture}"), child: Image(
height: 240.0, image: CachedNetworkImageProvider("$homeAssistantWebHost${entity.entityPicture}"),
width: 320.0, height: 240.0,
fit: BoxFit.contain, //width: 320.0,
fit: BoxFit.contain,
),
) )
], ],
), ),

View File

@ -97,6 +97,7 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
], ],
), ),
body: ListView( body: ListView(
scrollDirection: Axis.vertical,
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
children: <Widget>[ children: <Widget>[
Text( Text(
@ -150,8 +151,15 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
} }
), ),
new Row( new Row(
mainAxisSize: MainAxisSize.min,
children: [ children: [
Text("Login with access token (HA >= 0.78.0)"), Flexible(
child: Text(
"Login with access token (HA >= 0.78.0)",
softWrap: true,
maxLines: 2,
),
),
Switch( Switch(
value: (_newAuthType == "access_token"), value: (_newAuthType == "access_token"),
onChanged: (value) { onChanged: (value) {