AvailableFeatures class

Provides functionality to parse and manage available features from JSON.

This class handles the conversion of JSON data into an AvailableFeatures object, allowing easy access to various feature flags that indicate the availability of specific functionalities within the application. It supports conditional parsing for platform-specific feature availability.

Example usage:

AvailableFeatures features = availableFeaturesFromJson(jsonString);
print(features.isLocationAttachmentAvailable); // true or false based on platform and JSON

Constructors

AvailableFeatures({bool? isLocationAttachmentAvailable, bool? isClearChatAvailable, bool? isDeleteChatAvailable, bool? isVideoAttachmentAvailable, bool? isOneToOneCallAvailable, bool? isTranslationAvailable, bool? isViewAllMediaAvailable, bool? isDocumentAttachmentAvailable, bool? isGroupCallAvailable, bool? isRecentChatSearchAvailable, bool? isImageAttachmentAvailable, bool? isGroupChatAvailable, bool? isContactAttachmentAvailable, bool? isStarMessageAvailable, bool? isAttachmentAvailable, bool? isAudioAttachmentAvailable, bool? isBlockAvailable, bool? isReportAvailable, bool? isDeleteMessageAvailable, bool? isChatHistoryAvailable})
Constructs an AvailableFeatures instance from a JSON map.
AvailableFeatures.fromJson(Map<String, dynamic> json)
Creates an AvailableFeatures instance from a JSON map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isAttachmentAvailable bool?
Indicates whether any form of attachment is available.
getter/setter pair
isAudioAttachmentAvailable bool?
Indicates whether audio attachment is available.
getter/setter pair
isBlockAvailable bool?
Indicates whether blocking users is available.
getter/setter pair
isChatHistoryAvailable bool?
Indicates whether accessing chat history is available.
getter/setter pair
isClearChatAvailable bool?
Indicates whether clearing chat is available.
getter/setter pair
isContactAttachmentAvailable bool?
Indicates whether contact attachment is available.
getter/setter pair
isDeleteChatAvailable bool?
Indicates whether deleting chat is available.
getter/setter pair
isDeleteMessageAvailable bool?
Indicates whether deleting messages is available.
getter/setter pair
isDocumentAttachmentAvailable bool?
Indicates whether document attachment is available.
getter/setter pair
isGroupCallAvailable bool?
Indicates whether group call is available.
getter/setter pair
isGroupChatAvailable bool?
Indicates whether group chat is available.
getter/setter pair
isImageAttachmentAvailable bool?
Indicates whether image attachment is available.
getter/setter pair
isLocationAttachmentAvailable bool?
Indicates whether location attachment is available.
getter/setter pair
isOneToOneCallAvailable bool?
Indicates whether one-to-one call is available.
getter/setter pair
isRecentChatSearchAvailable bool?
Indicates whether recent chat search is available.
getter/setter pair
isReportAvailable bool?
Indicates whether reporting is available.
getter/setter pair
isStarMessageAvailable bool?
Indicates whether starring messages is available.
getter/setter pair
isTranslationAvailable bool?
Indicates whether translation is available.
getter/setter pair
isVideoAttachmentAvailable bool?
Indicates whether video attachment is available.
getter/setter pair
isViewAllMediaAvailable bool?
Indicates whether viewing all media is available.
getter/setter pair
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>
Converts an AvailableFeatures instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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