From 06a25b89e61408ff1adc62461ed6965f8b9ddea1 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 2 Feb 2026 21:48:08 +0100 Subject: [PATCH] update readme and remove unneeded deps --- README.md | 22 ++++++++++++++----- flake.nix | 10 ++------- .../secure_storage_controller.dart | 19 ---------------- lib/pages/settings_page.dart | 9 +------- 4 files changed, 20 insertions(+), 40 deletions(-) delete mode 100644 lib/controllers/secure_storage_controller.dart diff --git a/README.md b/README.md index 62d2b75..c6b5b0d 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S - [x] Using a text/uri/link - [x] Plain text - [x] `matrix:` Uri - - [ ] Matrix.to link: I just need to fix my regex + - [ ] Matrix.to link: I just need to fix my regex, I should do this next. - [ ] From space - [ ] Exploring - [x] Leaving @@ -108,7 +108,7 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S - [ ] About - [x] Log Out -## Development +## Build Instructions First, clone and open the repo: @@ -122,13 +122,13 @@ cd nexus #### Linux - With Nix: Either use direnv, or `nix flake develop` -- Without Nix: Install Flutter, Rust, the libsecret dev package for your distro (must be in `PKG_CONFIG_PATH`), and sqlite (must be in `LD_LIBRARY_PATH`). +- Without Nix: Install Flutter, Go, Olm, Git, Clang, and GLibc. #### Windows / MacOS -I don't really know. You will need Flutter and Rust, and otherwise I guess just keep installing stuff until there aren't any errors. +I don't really know. You will need Flutter, Git, Olm, Go, and Visual Studio tools, and otherwise I guess just keep installing stuff until there aren't any errors. I will look into this sometimeTM. -### +### Set up Flutter Get dependencies: @@ -136,6 +136,18 @@ Get dependencies: flutter pub get ``` +Get dependencies: + +```sh +flutter pub get +``` + +Clone Gomuks and generate bindings: + +```sh +scripts/generate.sh +``` + Build generated files, and watch for new changes: ```sh diff --git a/flake.nix b/flake.nix index c4c5cc3..860d010 100644 --- a/flake.nix +++ b/flake.nix @@ -45,17 +45,11 @@ olm git clang - (flutter.override { extraPkgConfigPackages = [ pkgs.libsecret ]; }) - - (pkgs.writeShellScriptBin "rustup" (builtins.readFile ./nix/fake-rustup.sh)) + flutter ]; env = { - LD_LIBRARY_PATH = "${ - pkgs.lib.makeLibraryPath ([ - pkgs.sqlite - ]) - }:./build/native_assets/linux"; + LD_LIBRARY_PATH = "./build/native_assets/linux"; CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ]; }; }; diff --git a/lib/controllers/secure_storage_controller.dart b/lib/controllers/secure_storage_controller.dart deleted file mode 100644 index 4a5781b..0000000 --- a/lib/controllers/secure_storage_controller.dart +++ /dev/null @@ -1,19 +0,0 @@ -import "package:flutter_riverpod/flutter_riverpod.dart"; -import "package:flutter_secure_storage/flutter_secure_storage.dart"; - -class SecureStorageController extends Notifier { - @override - FlutterSecureStorage build() => FlutterSecureStorage(); - - Future get(String key) => state.read(key: key); - - Future set(String key, String value) => - state.write(key: key, value: value); - - Future clear() => state.deleteAll(); - - static final provider = - NotifierProvider( - SecureStorageController.new, - ); -} diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index b348aac..505904c 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -1,18 +1,11 @@ import "package:flutter/material.dart"; import "package:flutter_riverpod/flutter_riverpod.dart"; -import "package:nexus/controllers/secure_storage_controller.dart"; class SettingsPage extends ConsumerWidget { const SettingsPage({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { - return Scaffold( - appBar: AppBar(title: Text("Settings")), - body: ElevatedButton( - onPressed: ref.watch(SecureStorageController.provider.notifier).clear, - child: Text("Log out"), - ), - ); + return Placeholder(); } }