kind of working!

This commit is contained in:
Henry Hiles 2026-01-24 16:39:56 +00:00
commit c0dfb6370e
No known key found for this signature in database
3 changed files with 31 additions and 24 deletions

View file

@ -97,17 +97,19 @@ class App extends ConsumerWidget {
builder: (context) => ref
.watch(SharedPrefsController.provider)
.betterWhen(
data: (_) {
final response = ref
.watch(ClientController.provider.notifier)
.sendCommand("login", {
"homeserver_url": "federated.nexus",
"username": "quadradical",
"password": "Quadmarad1!",
});
return Text(response.toString());
},
data: (_) => ElevatedButton(
onPressed: () async {
final response = ref
.watch(ClientController.provider.notifier)
.sendCommand("login", {
"homeserver_url": "https://matrix.federated.nexus",
"username": "quadradical",
"password": "Quadfnrad1!",
});
print(response);
},
child: Text("foo"),
),
// .betterWhen(
// data: (client) =>
// client.accessToken == null ? LoginPage() : ChatPage(),