setActiveProfileById method
Sets the active profile by its ID.
profileId
- ID of the profile to set as active
Throws an exception if profiles are not loaded or if the profile ID doesn't exist.
Implementation
void setActiveProfileById(String profileId) {
if (_profiles == null) {
throw Exception('Launcher profiles not loaded');
}
if (!_profiles!.profiles.containsKey(profileId)) {
throw Exception('Profile with ID $profileId not found');
}
_activeProfile = _profiles!.profiles[profileId];
}