make `CommentTag` private
This commit is contained in:
parent
3381e0c375
commit
dec88a1d88
|
@ -107,10 +107,10 @@ class Comment extends StatelessWidget {
|
||||||
)),
|
)),
|
||||||
onLongPress: _goToUser,
|
onLongPress: _goToUser,
|
||||||
),
|
),
|
||||||
if (isOP) CommentTag('OP', Theme.of(context).accentColor),
|
if (isOP) _CommentTag('OP', Theme.of(context).accentColor),
|
||||||
if (comment.banned) CommentTag('BANNED', Colors.red),
|
if (comment.banned) _CommentTag('BANNED', Colors.red),
|
||||||
if (comment.bannedFromCommunity)
|
if (comment.bannedFromCommunity)
|
||||||
CommentTag('BANNED FROM COMMUNITY', Colors.red),
|
_CommentTag('BANNED FROM COMMUNITY', Colors.red),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text(timeago.format(comment.published, locale: 'en_short')),
|
Text(timeago.format(comment.published, locale: 'en_short')),
|
||||||
Text(' · '),
|
Text(' · '),
|
||||||
|
@ -167,11 +167,11 @@ class Comment extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CommentTag extends StatelessWidget {
|
class _CommentTag extends StatelessWidget {
|
||||||
final String text;
|
final String text;
|
||||||
final Color bgColor;
|
final Color bgColor;
|
||||||
|
|
||||||
const CommentTag(this.text, this.bgColor);
|
const _CommentTag(this.text, this.bgColor);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Padding(
|
Widget build(BuildContext context) => Padding(
|
||||||
|
|
Loading…
Reference in New Issue