UserRating class abstract
This object describes the rating of a user based on their Telegram Star spendings.
- Available extensions
- Annotations
-
- @freezed
Constructors
- UserRating({@JsonKey.new(name: 'level') required int level, @JsonKey.new(name: 'rating') required int rating, @JsonKey.new(name: 'current_level_rating') required int currentLevelRating, @JsonKey.new(name: 'next_level_rating') int? nextLevelRating})
-
Creates the UserRating object.
constfactory
-
UserRating.fromJson(Map<
String, dynamic> json) -
Creates the UserRating object from a JSON map.
factory
Properties
-
copyWith
→ $UserRatingCopyWith<
UserRating> -
Create a copy of UserRating
with the given fields replaced by the non-null parameter values.
no setterinherited
- currentLevelRating → int
-
The rating value required to get the current level
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- level → int
-
Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.
no setterinherited
- nextLevelRating → int?
-
Optional. The rating value required to get to the next level; omitted if the maximum level was reached
no setterinherited
- rating → int
-
Numerical value of the user's rating; the higher the rating, the better
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_UserRating value)) → TResult -
Available on UserRating, provided by the UserRatingPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_UserRating value)?) → TResult? -
Available on UserRating, provided by the UserRatingPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_UserRating value)?, {required TResult orElse()}) → TResult -
Available on UserRating, provided by the UserRatingPatterns extension
A variant ofmapthat fallback to returningorElse. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this UserRating to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited