forked from Henry-Hiles/nexus
update readme and remove unneeded deps
This commit is contained in:
parent
db2a169f34
commit
06a25b89e6
4 changed files with 20 additions and 40 deletions
22
README.md
22
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
|
||||
|
|
|
|||
10
flake.nix
10
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 ];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
import "package:flutter_secure_storage/flutter_secure_storage.dart";
|
||||
|
||||
class SecureStorageController extends Notifier<FlutterSecureStorage> {
|
||||
@override
|
||||
FlutterSecureStorage build() => FlutterSecureStorage();
|
||||
|
||||
Future<String?> get(String key) => state.read(key: key);
|
||||
|
||||
Future<void> set(String key, String value) =>
|
||||
state.write(key: key, value: value);
|
||||
|
||||
Future<void> clear() => state.deleteAll();
|
||||
|
||||
static final provider =
|
||||
NotifierProvider<SecureStorageController, FlutterSecureStorage>(
|
||||
SecureStorageController.new,
|
||||
);
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue