Community class abstract

Represents a community (a group of chats).

Available extensions
Annotations
  • @freezed

Constructors

Community({@JsonKey.new(name: 'id') required int id, @JsonKey.new(name: 'name') required String name})
Creates a new Community object.
const
factory
Community.fromJson(Map<String, dynamic> json)
Creates a new Community object from a JSON Map.
factory

Properties

copyWith → $CommunityCopyWith<Community>
Create a copy of Community with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id int
Unique identifier for this community. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
no setterinherited
name String
Name of the community
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Community value)) → TResult

Available on Community, provided by the CommunityPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Community value)?) → TResult?

Available on Community, provided by the CommunityPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Community value)?, {required TResult orElse()}) → TResult

Available on Community, provided by the CommunityPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Community to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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