start of settings layout

This commit is contained in:
Daniel Borges 2019-08-06 18:34:07 -03:00
parent e48f4b5686
commit d1809ef156
1 changed files with 69 additions and 4 deletions

View File

@ -3,18 +3,83 @@ import 'package:flutter/material.dart';
class Settings extends StatefulWidget {
@override
State<StatefulWidget> createState() => _SettingState();
}
class _SettingState extends State<Settings> {
String serverIp;
int serverPort;
bool useHttps;
bool needsAuth;
String userId;
String userPassword;
@override
void initState() {
super.initState();
serverIp = '192.168.1.100';
serverPort = 4316;
useHttps = false;
needsAuth = false;
userId = 'openlp';
userPassword = 'password';
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Settings'),
),
body: Container(),
body: ListView(
children: <Widget>[
ListTile(
title: Text('Server IP'),
subtitle: Text(serverIp),
onTap: () {},
),
ListTile(
title: Text('Server port'),
subtitle: Text('$serverPort'),
onTap: () {},
),
CheckboxListTile(
title: Text('Use HTTPS'),
onChanged: (value) {
setState(() {
useHttps = value;
});
},
value: useHttps,
),
Divider(),
CheckboxListTile(
title: Text('Needs auth'),
onChanged: (value) {
setState(() {
needsAuth = value;
});
},
value: needsAuth,
),
ListTile(
enabled: needsAuth,
title: Text('User ID'),
subtitle: Text(userId),
onTap: () {},
),
ListTile(
enabled: needsAuth,
title: Text('User password'),
subtitle: Text(userPassword),
onTap: () {},
),
Divider(),
ListTile(
title: Text('About OpenLP'),
onTap: () {},
),
],
),
);
}
}
}