Sonnat Project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

1 year ago
  1. import 'package:flutter/material.dart';
  2. import 'package:sonnat/core/utils/app_utils.dart';
  3. import 'package:sonnat/features/single_post/view_models/comment.dart';
  4. class PostCommentWidget extends StatelessWidget {
  5. final Comment comment;
  6. const PostCommentWidget({super.key, required this.comment});
  7. @override
  8. Widget build(BuildContext context) {
  9. return Container(
  10. decoration: BoxDecoration(
  11. color: const Color(0xff8D95AB).withOpacity(0.35),
  12. borderRadius: BorderRadius.circular(19),
  13. ),
  14. margin: const EdgeInsets.only(bottom: 8, top: 8),
  15. padding: const EdgeInsetsDirectional.only(
  16. top: 14,
  17. bottom: 18,
  18. start: 18,
  19. end: 23,
  20. ),
  21. child: Column(
  22. crossAxisAlignment: CrossAxisAlignment.start,
  23. children: [
  24. Row(
  25. children: [
  26. Text(
  27. comment.author,
  28. style: const TextStyle(
  29. color: Color(0xff404966),
  30. fontSize: 8,
  31. ),
  32. ),
  33. const SizedBox(width: 4),
  34. Text(
  35. Utils.instance.dateToString(comment.date),
  36. style: const TextStyle(
  37. color: Color(0xff404966),
  38. fontSize: 8,
  39. ),
  40. ),
  41. ],
  42. ),
  43. const SizedBox(height: 13),
  44. Text(
  45. comment.text,
  46. style: const TextStyle(
  47. color: Color(0xff636E88),
  48. fontSize: 10,
  49. fontFamily: 'Vazir',
  50. ),
  51. ),
  52. ],
  53. ),
  54. );
  55. }
  56. }