TF-2068 Remove the comma of the last attendee in EventAttendeeDetailWidget
(cherry picked from commit 48906b1ac2d0e1ef978e410b0ba2719769c7fa19)
This commit is contained in:
@@ -6,10 +6,12 @@ import 'package:tmail_ui_user/features/email/presentation/styles/attendee_widget
|
|||||||
class AttendeeWidget extends StatelessWidget {
|
class AttendeeWidget extends StatelessWidget {
|
||||||
|
|
||||||
final CalendarAttendee attendee;
|
final CalendarAttendee attendee;
|
||||||
|
final List<CalendarAttendee> listAttendees;
|
||||||
|
|
||||||
const AttendeeWidget({
|
const AttendeeWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.attendee
|
required this.attendee,
|
||||||
|
required this.listAttendees,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -33,7 +35,8 @@ class AttendeeWidget extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w500
|
fontWeight: FontWeight.w500
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const TextSpan(text: ', '),
|
if (listAttendees.last != attendee)
|
||||||
|
const TextSpan(text: ', '),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ class _EventAttendeeDetailWidgetState extends State<EventAttendeeDetailWidget> {
|
|||||||
children: [
|
children: [
|
||||||
OrganizerWidget(organizer: widget.organizer),
|
OrganizerWidget(organizer: widget.organizer),
|
||||||
..._attendeesDisplayed
|
..._attendeesDisplayed
|
||||||
.map((attendee) => AttendeeWidget(attendee: attendee))
|
.map((attendee) => AttendeeWidget(attendee: attendee, listAttendees: _attendeesDisplayed))
|
||||||
.toList(),
|
.toList(),
|
||||||
if (!_isShowAllAttendee)
|
if (!_isShowAllAttendee)
|
||||||
Padding(
|
Padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user