Small fixes
This commit is contained in:
parent
a54d0e4c0f
commit
043b06dedc
8 changed files with 2678 additions and 93 deletions
|
@ -8,7 +8,7 @@ import 'package:zontreck/Packets.dart';
|
|||
import 'package:zontreck/Settings.dart';
|
||||
|
||||
class LoginAccountPage extends StatefulWidget {
|
||||
LoginAccountPage({super.key});
|
||||
const LoginAccountPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => LoginAccountState();
|
||||
|
@ -25,35 +25,35 @@ class LoginAccountState extends State<LoginAccountPage> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("OpenSim - Login"),
|
||||
title: const Text("OpenSim - Login"),
|
||||
backgroundColor: Constants.TITLEBAR_COLOR,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text("First Name"),
|
||||
title: const Text("First Name"),
|
||||
subtitle: TextField(
|
||||
controller: first,
|
||||
decoration: InputDecoration(hintText: "Jane"),
|
||||
decoration: const InputDecoration(hintText: "Jane"),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Last Name"),
|
||||
title: const Text("Last Name"),
|
||||
subtitle: TextField(
|
||||
controller: last,
|
||||
decoration: InputDecoration(hintText: "Smith"),
|
||||
decoration: const InputDecoration(hintText: "Smith"),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Password"),
|
||||
title: const Text("Password"),
|
||||
subtitle: TextField(
|
||||
controller: pass,
|
||||
obscureText: true,
|
||||
obscuringCharacter: "*",
|
||||
decoration: InputDecoration(hintText: "*******"),
|
||||
decoration: const InputDecoration(hintText: "*******"),
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
|
@ -68,7 +68,7 @@ class LoginAccountState extends State<LoginAccountPage> {
|
|||
print("RESPONSE : ${response.encode()}");
|
||||
if (response.loggedIn) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text("Login success")));
|
||||
const SnackBar(content: Text("Login success")));
|
||||
|
||||
settings.loggedIn = true;
|
||||
settings.currentUser = response.user;
|
||||
|
@ -87,7 +87,7 @@ class LoginAccountState extends State<LoginAccountPage> {
|
|||
"Error while logging in: ${response.reason}")));
|
||||
}
|
||||
},
|
||||
child: Text("Login"))
|
||||
child: const Text("Login"))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue