-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-errors-map
- Loading branch information
Showing
15 changed files
with
303 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
@immutable | ||
|
||
/// This class represents the details to display a comment count/icon on the post card. | ||
class CommentCountDetails { | ||
final int count; | ||
final bool isIconBlue; | ||
|
||
// An empty instance of CommentCountDetails | ||
// to be used as a default value. | ||
static const CommentCountDetails empty = CommentCountDetails( | ||
count: 0, | ||
isIconBlue: false, | ||
); | ||
|
||
const CommentCountDetails({ | ||
required this.count, | ||
required this.isIconBlue, | ||
}); | ||
|
||
@override | ||
bool operator ==(Object other) { | ||
return other is CommentCountDetails && | ||
other.count == count && | ||
other.isIconBlue == isIconBlue; | ||
} | ||
|
||
@override | ||
int get hashCode { | ||
return Object.hash( | ||
count, | ||
isIconBlue, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import "package:proxima/models/ui/comment_count_details.dart"; | ||
|
||
// Comment count details for testing purposes. | ||
const List<CommentCountDetails> testCommentCounts = [ | ||
CommentCountDetails(count: 1324, isIconBlue: true), | ||
CommentCountDetails(count: 0, isIconBlue: false), | ||
CommentCountDetails(count: 1, isIconBlue: true), | ||
CommentCountDetails(count: 100, isIconBlue: false), | ||
CommentCountDetails(count: 999, isIconBlue: true), | ||
]; |
15 changes: 9 additions & 6 deletions
15
test/mocks/overrides/override_post_comment_count_view_model.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.