Suggestion class
Constructors
-
Suggestion({required String id, required String title, required String authorId, required bool isAnonymous, required DateTime creationTime, required SuggestionStatus status, String? description, List<
SuggestionLabel> labels = const <SuggestionLabel>[], List<String> images = const <String>[], List<Comment> comments = const <Comment>[], Set<String> notifyUserIds = const <String>{}, Set<String> votedUserIds = const <String>{}}) -
const
-
Suggestion.empty({String title = '', bool isAnonymous = false, List<
String> images = const <String>[], SuggestionStatus status = SuggestionStatus.requests, List<SuggestionLabel> labels = const <SuggestionLabel>[], List<Comment> comments = const <Comment>[], String id = '0', String authorId = '', String? description = '', DateTime? creationTime, Set<String> notifyUserIds = const <String>{}, Set<String> votedUserIds = const <String>{}}) -
Suggestion.fromJson({required Map<
String, dynamic> json}) -
factory
Properties
-
Id of the suggestion's author
final
-
comments
→ List<
Comment> -
Comments to this suggestion
final
- creationTime → DateTime
-
The time of suggestion creation
final
- description → String?
-
Suggestion's description
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The id of the suggestion
final
-
images
→ List<
String> -
Attached images
final
- isAnonymous → bool
-
Whether suggestion was posted anonymously or not
final
-
labels
→ List<
SuggestionLabel> -
Suggestion's labels (feature, bug)
final
-
notifyUserIds
→ Set<
String> -
Id`s of users who have subscribed for this suggestion
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → SuggestionStatus
-
Status of the suggestion (requests, inProgress, completed)
final
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - title → String
-
Suggestion's title
final
- upvotesCount → int
-
no setter
-
votedUserIds
→ Set<
String> -
Id`s of users who have voted for this suggestion
final
Methods
-
copyWith(
{String? id, String? title, String? description, List< Comment> ? comments, List<String> ? images, List<SuggestionLabel> ? labels, String? authorId, bool? isAnonymous, DateTime? creationTime, SuggestionStatus? status, Set<String> ? votedUserIds, Set<String> ? notifyUserIds}) → Suggestion -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toUpdatingJson(
) → Map< String, dynamic>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited