38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:business_panel/domain/entities/comment_entity.dart';
|
|
import 'package:business_panel/presentation/widgets/user_comment_card.dart';
|
|
|
|
class CommentsSection extends StatelessWidget {
|
|
final List<CommentEntity> comments;
|
|
|
|
const CommentsSection({super.key, required this.comments});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
if (comments.isEmpty) {
|
|
return const SizedBox.shrink();
|
|
}
|
|
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const SizedBox(height: 10),
|
|
Row(
|
|
children: [
|
|
// SvgPicture.asset(Assets.icons.line2),
|
|
const SizedBox(width: 8),
|
|
// const Text('نظرات کاربران', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
|
|
],
|
|
),
|
|
ListView.builder(
|
|
shrinkWrap: true,
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
itemCount: comments.length,
|
|
itemBuilder: (context, index) {
|
|
return UserCommentCard(comment: comments[index]);
|
|
},
|
|
),
|
|
],
|
|
);
|
|
}
|
|
} |