make `CommentTag` private

This commit is contained in:
krawieck 2020-09-03 00:10:36 +02:00
parent 3381e0c375
commit dec88a1d88
1 changed files with 5 additions and 5 deletions

View File

@ -107,10 +107,10 @@ class Comment extends StatelessWidget {
)),
onLongPress: _goToUser,
),
if (isOP) CommentTag('OP', Theme.of(context).accentColor),
if (comment.banned) CommentTag('BANNED', Colors.red),
if (isOP) _CommentTag('OP', Theme.of(context).accentColor),
if (comment.banned) _CommentTag('BANNED', Colors.red),
if (comment.bannedFromCommunity)
CommentTag('BANNED FROM COMMUNITY', Colors.red),
_CommentTag('BANNED FROM COMMUNITY', Colors.red),
Spacer(),
Text(timeago.format(comment.published, locale: 'en_short')),
Text(' · '),
@ -167,11 +167,11 @@ class Comment extends StatelessWidget {
}
}
class CommentTag extends StatelessWidget {
class _CommentTag extends StatelessWidget {
final String text;
final Color bgColor;
const CommentTag(this.text, this.bgColor);
const _CommentTag(this.text, this.bgColor);
@override
Widget build(BuildContext context) => Padding(