kind of working!
This commit is contained in:
parent
20f69ca0aa
commit
c0dfb6370e
3 changed files with 31 additions and 24 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue