Add new builtin profiles, better handline of initialization, bump version

This commit is contained in:
stopflock
2025-10-24 16:23:09 -05:00
parent 2a7004e5a2
commit c8ae925dc1
6 changed files with 78 additions and 16 deletions
+12 -1
View File
@@ -8,8 +8,19 @@ class OperatorProfileState extends ChangeNotifier {
List<OperatorProfile> get profiles => List.unmodifiable(_profiles);
Future<void> init() async {
Future<void> init({bool addDefaults = false}) async {
_profiles.addAll(await OperatorProfileService().load());
// Add default operator profiles if this is first launch
if (addDefaults) {
final defaults = [
OperatorProfile.lowes(),
OperatorProfile.homeDepot(),
];
_profiles.addAll(defaults);
await OperatorProfileService().save(_profiles);
}
}
void addOrUpdateProfile(OperatorProfile p) {