flutter_calendar_view
flutter_calendar_view copied to clipboard
is there a way to create dayView with 30 minutes slots
I want to create day view with with 30 minutes slots. for now it giving 1 hour slots so i am unable to arrange two event in one slot when i do this my event tile gets overflow how can i solve this
this my whole code where
Rx<EventController> eventController = EventController().obs;
print statement for startDate and endDate start time----------------------2022-05-06 15:00:00.000 endTime--------------------2022-05-06 15:30:00.000 start time----------------------2022-05-06 12:00:00.000 endTime--------------------2022-05-06 12:30:00.000 start time----------------------2022-05-06 14:30:00.000 endTime--------------------2022-05-06 15:00:00.000 start time----------------------2022-05-06 14:00:00.000 endTime--------------------2022-05-06 14:30:00.000 CalendarEventData data = CalendarEventData( title: "$name", color: Colors.pinkAccent, description: serviceName, date: startTime, startTime: startTime, endDate: endTime, endTime: endTime, ); eventController.value.add(data);
`DayView( controller: controller.eventController.value, timeLineOffset: 0.5, timeLineBuilder: (date) { return Text(DateFormat("HH:mm").format(date)); }, liveTimeIndicatorSettings: HourIndicatorSettings(color: Colors.red), verticalLineOffset: 40, eventTileBuilder: (date, events, boundary, start, end) { print(" length ${events.length}"); String str = "${DateFormat("HH:mm").format(events[0].startTime)}-${DateFormat("HH:mm").format(events[0].endTime)} ${events[0].title.substring(0, events[0].title.length - 1)}"; return Container( color: events[0].color, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Flexible( child: Text("$str", style: Get.textTheme.headline6.merge( TextStyle(color: Get.theme.primaryColor), )), ), ], ), Row( children: [ Flexible(child: Text("${events[0].description}")), ], ), ], ), ); }, showVerticalLine: false, // To display live time line in day view. showLiveTimeLineInAllDays: true, // To display live time line in all pages in day view. heightPerMinute: 1.8, eventArranger: SideEventArranger(),
onEventTap: (events, date) => print(events),
)`
mac@macs-Mac-mini-3 % flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.5, on macOS 11.5.2 20G95 darwin-x64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [!] Xcode - develop for iOS and macOS (Xcode 12.5) ! Flutter recommends a minimum Xcode version of 13. Download the latest version or update via the Mac App Store. [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] Connected device (2 available) [✓] HTTP Host Availability
! Doctor found issues in 1 category. mac@macs-Mac-mini-3 zylu_business %
Please ignore above PR.
@vishalvishvakarma1111 Please share more info. I am not able to reproduce the issue from given code.
Hi @vishalvishvakarma1111, I'm closing this issue for now. We have provided a new field in DayView
and WeekView
named minutesSlotSize
to define the slot sizes. Feel free to reopen this issue if this is not the functionality you were asking for.