treewide(refactor): rename files to follow the same style

This commit is contained in:
Henry Hiles 2026-07-18 12:12:54 -04:00
commit 7992f0e815
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
81 changed files with 167 additions and 167 deletions

30
lib/controllers/key.dart Normal file
View file

@ -0,0 +1,30 @@
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:nexus/controllers/shared_prefs.dart";
class KeyController extends Notifier<String?> {
final String key;
KeyController(this.key);
static const String spaceKey = "space";
static const String roomKey = "room";
@override
String? build() =>
ref.watch(SharedPrefsController.provider).requireValue.getString(key);
Future<void> set(String? value) async {
final prefs = ref.watch(SharedPrefsController.provider).requireValue;
state = value;
if (value == null) {
prefs.remove(key);
} else {
prefs.setString(key, value);
}
}
static final provider =
NotifierProvider.family<KeyController, String?, String>(
KeyController.new,
);
}