diff --git a/lib/src/widgets/settings.dart b/lib/src/widgets/settings.dart index cfe3299..2c472f6 100644 --- a/lib/src/widgets/settings.dart +++ b/lib/src/widgets/settings.dart @@ -3,18 +3,83 @@ import 'package:flutter/material.dart'; class Settings extends StatefulWidget { @override State createState() => _SettingState(); - } class _SettingState extends State { + 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: [ + 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: () {}, + ), + ], + ), ); } - -} \ No newline at end of file +}