shows room but not really

This commit is contained in:
Henry Hiles 2026-01-27 19:09:43 +00:00
commit a28bced44d
No known key found for this signature in database
23 changed files with 885 additions and 805 deletions

View file

@ -0,0 +1,24 @@
import "package:ffi/ffi.dart";
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:nexus/controllers/client_controller.dart";
import "package:nexus/src/third_party/gomuks.g.dart";
class HeaderController extends AsyncNotifier<Map<String, String>> {
@override
Future<Map<String, String>> build() async {
final handle = await ref.watch(ClientController.provider.future);
final info = GomuksGetAccountInfo(handle);
final headers = {
"authorization":
"Bearer ${info.access_token.cast<Utf8>().toDartString()}",
};
GomuksFreeAccountInfo(info);
return headers;
}
static final provider =
AsyncNotifierProvider<HeaderController, Map<String, String>>(
HeaderController.new,
);
}