Skip to content

SfCalender appointment resize width automaticaly in dayview #765

@xyzbilal

Description

@xyzbilal

When I choose dayview my appoinments occupy full width shown in first image and after a second it resize to half width;
What can be the reason for it?

Simulator Screen Shot - iPhone 14 Pro Max - 2023-04-18 at 13 53 03
Simulator Screen Shot - iPhone 14 Pro Max - 2023-04-18 at 13 52 50

myAppoinmentBuilder is like below;


 appointmentBuilder: (ctx, CalendarAppointmentDetails details) {
                Meeting meet = details.appointments.first;

                c.loadingDetails.putIfAbsent( details.appointments.first.id,() => false.obs);
              return GestureDetector(
                      child: Container(
                         width: details.bounds.width,
                        height: details.bounds.height,
                          decoration: BoxDecoration(
                              borderRadius:
                                  const BorderRadius.all(Radius.circular(5)),
                              color: meet.background
                              // Color.fromRGBO(Random().nextInt(230),
                              // Random().nextInt(230), Random().nextInt(230), 1)
                              ),
    
                          padding: const EdgeInsets.all(5),
                          child:ObxValue((RxBool loading) {
                            
                          if(loading.value)
                          return Text("Yükleniyor..");
                          
                     return      c.viewMode == CalendarView.month ||
                                  c.viewMode == CalendarView.day ||
                                  c.viewMode == CalendarView.schedule
                              ? SingleChildScrollView(
                                  child: Column(
                                    crossAxisAlignment:
                                        CrossAxisAlignment.start,
                                    children: [
                                      Row(
                                        mainAxisAlignment:
                                            MainAxisAlignment.start,
                                        children: [
                                          Flexible(
                                            child: Text(meet.eventName,
                                                overflow: TextOverflow.fade,
                                                maxLines: 1,
                                                style: const TextStyle(
                                                    fontSize: 9,
                                                    color: Colors.white)),
                                          ),
                                        ],
                                      ),
                                      5.height,
                                      if (!meet.isAllDay)
                                        Row(
                                          mainAxisAlignment:
                                              MainAxisAlignment.start,
                                          children: [
                                            Flexible(
                                              child: Text(
                                                  meet.start! + " " + meet.end!,
                                                  overflow: TextOverflow.fade,
                                                  maxLines: 1,
                                                  style: const TextStyle(
                                                      fontSize: 8,
                                                      color: Colors.white)),
                                            ),
                                          ],
                                        ),
                                    ],
                                  ),
                                )
                              : Text(
                                  meet.eventName,
                                  overflow: TextOverflow.ellipsis,
                                  maxLines: 2,
                                  style: const TextStyle(
                                      fontSize: 11, color: Colors.white),
                                );},c.loadingDetails[details.appointments.first.id]!)),
                     onLongPress: () {
                        c.showDetails(details.appointments.first.id);
                      },
                      onTap: () {
                        c.showDetails(details.appointments.first.id);
                      },
                    );
              }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions