mirror of
https://gitlab.com/openlp/openlp-mobile-remote.git
synced 2024-12-23 04:12:49 +00:00
start of settings layout
This commit is contained in:
parent
e48f4b5686
commit
d1809ef156
@ -3,18 +3,83 @@ import 'package:flutter/material.dart';
|
|||||||
class Settings extends StatefulWidget {
|
class Settings extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => _SettingState();
|
State<StatefulWidget> createState() => _SettingState();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SettingState extends State<Settings> {
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text('Settings'),
|
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: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user