ProfileManager class

Manages Minecraft launcher profiles, including loading, saving, and manipulating profile data.

Constructors

ProfileManager.new({required String gameDir, LauncherProfiles? profiles, Profile? activeProfile})
Creates a new ProfileManager instance.

Properties

activeProfile Profile
Gets the active profile.
getter/setter pair
gameDir String
Directory where game files and launcher profiles are stored.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
profiles LauncherProfiles
Gets the launcher profiles.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createProfile({required String name, required String versionId, String? gameDir, String? javaDir, String? javaArgs, String icon = 'Furnace', bool skipJreVersionCheck = false, String type = 'custom'}) Future<Profile>
Creates a new profile with the specified settings.
deleteProfile(String profileId) Future<void>
Deletes a profile.
findProfileIdByName(String name) String?
Finds a profile ID by profile name.
loadProfiles() Future<void>
Loads launcher profiles from disk.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveProfiles() Future<void>
Saves launcher profiles to disk.
setActiveProfileById(String profileId) → void
Sets the active profile by its ID.
toString() String
A string representation of this object.
inherited
updateProfile(String profileId, Profile updatedProfile) Future<void>
Updates an existing profile with new settings.

Operators

operator ==(Object other) bool
The equality operator.
inherited