MastodonPreferences class
User account preferences model.
Retrieved via GET /api/v1/preferences.
Preferences are changed via PATCH /api/v1/accounts/update_credentials.
- Annotations
Constructors
- MastodonPreferences({required String postingDefaultVisibility, required bool postingDefaultSensitive, String? postingDefaultLanguage, String? postingDefaultQuotePolicy, required String readingExpandMedia, required bool readingExpandSpoilers})
-
Creates a MastodonPreferences with the given fields.
const
-
MastodonPreferences.fromJson(Map<
String, dynamic> json) -
Creates a MastodonPreferences from a JSON map.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- postingDefaultLanguage → String?
-
Default language for new posts (ISO 639-1 code,
nullif unset).final - postingDefaultQuotePolicy → String?
-
Default quote policy (v4.5.0+).
final
- postingDefaultSensitive → bool
-
Whether to mark new posts as sensitive by default.
final
- postingDefaultVisibility → String
-
Default visibility for new posts (
public/unlisted/private/direct).final - readingExpandMedia → String
-
Auto-display setting for media attachments (
default/show_all/hide_all).final - readingExpandSpoilers → bool
-
Whether to expand content warnings (CW) by default.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited