Thanks to visit codestin.com
Credit goes to github.com

Skip to content

syncfusion_flutter_calendar not working event #5770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 2 tasks
VPATEL007 opened this issue May 2, 2025 · 11 comments
Closed
1 of 2 tasks

syncfusion_flutter_calendar not working event #5770

VPATEL007 opened this issue May 2, 2025 · 11 comments
Assignees

Comments

@VPATEL007
Copy link

VPATEL007 commented May 2, 2025

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

I have used syncfusion_flutter_calendar: ^29.1.38 in flutterflow but when i run the website in Google Chrome or any other browser, it gives an error. Actually, same code will work in vs code using web I have attached the error and Code screenshot

Actually calender work but event is not show i have attached screenshot of crome using inspect element

Errro - main.dart.js?ajTkjdLh8zt8bBuEHGgw:4481 Uncaught Error: Unable to load asset: "packages/timezone/data/latest_all.tzf", GET https://preview.flutterflow.app/magic-c-r-m-etxxf2/ajTkjdLh8zt8bBuEHGgw/assets/packages/timezone/data/latest_all.tzf 404 (Not Found)

// Automatic FlutterFlow imports import '/backend/schema/structs/index.dart'; import '/backend/supabase/supabase.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/custom_code/widgets/index.dart'; // Imports other custom widgets import '/custom_code/actions/index.dart'; // Imports custom actions import '/flutter_flow/custom_functions.dart'; // Imports custom functions import 'package:flutter/material.dart'; // Begin custom widget code // DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:syncfusion_flutter_calendar/calendar.dart'; import 'dart:math'; import 'package:flutter/services.dart' show rootBundle; import 'package:timezone/timezone.dart' as tz; import 'package:http/http.dart' as http;

class CustomCalendar extends StatefulWidget { const CustomCalendar({ super.key, this.width, this.height, required this.appoitmentList, });

final double? width; final double? height; final List appoitmentList;

@OverRide State createState() => _CustomCalendarState(); }

class _CustomCalendarState extends State { List _getDataSource() { final List meetings = [];

final DateTime today = DateTime.now().toUtc();
final DateTime startTime =
    DateTime(today.year, today.month, today.day, 9, 0, 0).toUtc();
final DateTime endTime = startTime.add(const Duration(hours: 2)).toUtc();
meetings.add(
    Meeting('Conference', startTime, endTime, const Color(0xFF0F8644)));
meetings.add(Meeting(
    'Conference Two',
    DateTime(today.year, today.month, today.day, 11, 0, 0),
    DateTime(today.year, today.month, today.day, 11, 55, 0),
    Colors.pink));
return meetings;

}

void dragStart(AppointmentDragStartDetails appointmentDragStartDetails) { dynamic appointment = appointmentDragStartDetails.appointment; CalendarResource? resource = appointmentDragStartDetails.resource; }

void dragUpdate(AppointmentDragUpdateDetails appointmentDragUpdateDetails) { dynamic appointment = appointmentDragUpdateDetails.appointment; DateTime? draggingTime = appointmentDragUpdateDetails.draggingTime; Offset? draggingOffset = appointmentDragUpdateDetails.draggingPosition; CalendarResource? sourceResource = appointmentDragUpdateDetails.sourceResource; CalendarResource? targetResource = appointmentDragUpdateDetails.targetResource; }

void dragEnd(AppointmentDragEndDetails appointmentDragEndDetails) { Meeting appointments = appointmentDragEndDetails.appointment as Meeting; dynamic appointment = appointmentDragEndDetails.appointment!; CalendarResource? sourceResource = appointmentDragEndDetails.sourceResource; CalendarResource? targetResource = appointmentDragEndDetails.targetResource; DateTime? droppingTime = appointmentDragEndDetails.droppingTime; }

// Future _initializeTimeZone() async { // try { // // Replace with your Supabase Storage public URL // const String timezoneUrl = // 'https://bnlijccqpoyjgvmnhssa.supabase.co/storage/v1/object/public/Documents//latest_all.tzf'; // final response = await http.get(Uri.parse(timezoneUrl)); // if (response.statusCode == 200) { // final tzData = response.bodyBytes; // tz.initializeDatabase(tzData); // print('Timezone initialized successfully'); // } else { // print('Failed to fetch timezone data: ${response.statusCode}'); // } // } catch (e) { // print('Error initializing timezone: $e'); // } // }

@OverRide void initState() { // _initializeTimeZone(); super.initState(); }

@OverRide Widget build(BuildContext context) { return ClipRRect( borderRadius: BorderRadius.circular(20), // Aggiungi i bordi arrotondati child: Container( width: widget.width, height: widget.height, child: SfCalendar( view: CalendarView.week, allowDragAndDrop: true, onDragStart: dragStart, onDragUpdate: dragUpdate, onDragEnd: dragEnd, monthViewSettings: MonthViewSettings( appointmentDisplayMode: MonthAppointmentDisplayMode.appointment), backgroundColor: Colors.white, dataSource: MeetingDataSource(_getDataSource()), headerStyle: const CalendarHeaderStyle(backgroundColor: Colors.white), weekNumberStyle: const WeekNumberStyle( textStyle: TextStyle( fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xff151515))), resourceViewSettings: const ResourceViewSettings( displayNameTextStyle: TextStyle( fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xff151515))), showWeekNumber: false, cellBorderColor: const Color(0xffE8E8E8), ), ), ); }

Color getRandomColor() { final Random random = Random(); return Color.fromARGB( 255, // Alpha value (fully opaque) random.nextInt(256), // Red value random.nextInt(256), // Green value random.nextInt(256), // Blue value ); } }

class MeetingDataSource extends CalendarDataSource { MeetingDataSource(List source) { appointments = source; }

@OverRide DateTime getStartTime(int index) { return appointments![index].from; }

@OverRide DateTime getEndTime(int index) { return appointments![index].to; }

@OverRide String getSubject(int index) { return appointments![index].eventName; }

@OverRide Color getColor(int index) { return appointments![index].background; }

@OverRide Object? convertAppointmentToObject( Object? customData, Appointment appointment) { return Meeting(appointment.subject, appointment.startTime, appointment.endTime, appointment.color); } }

class Meeting { Meeting(this.eventName, this.from, this.to, this.background);

String eventName; DateTime from; DateTime to; Color background; }

Expected Behavior

i want to show event using syncfusion_flutter_calendar 29.1.40 but its show asset error and in flutterflow asset how can i add "packages/timezone/data/latest_all.tzf".

Steps to Reproduce

Create custome code and run

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

https://preview.flutterflow.app/magic-c-r-m-etxxf2/q5j7tocijWS0rSdIQyjq/assets/packages/timezone/data/latest_all.tzf

Visual documentation

I have used syncfusion_flutter_calendar: ^29.1.38 in flutterflow but when i run the website in Google Chrome or any other browser, it gives an error. Actually, same code will work in vs code using web I have attached the error and Code screenshot

Actually calender work but event is not show i have attached screenshot of crome using inspect element

Errro - main.dart.js?ajTkjdLh8zt8bBuEHGgw:4481 Uncaught Error: Unable to load asset: "packages/timezone/data/latest_all.tzf", GET https://preview.flutterflow.app/magic-c-r-m-etxxf2/ajTkjdLh8zt8bBuEHGgw/assets/packages/timezone/data/latest_all.tzf 404 (Not Found)

Environment

- FlutterFlow version: 
- Platform:
- Browser name and version:
- Operating system and version affected:

Additional Information

Image

@VPATEL007 VPATEL007 added the status: needs triage A potential issue that has not been confirmed as a bug. label May 2, 2025
Copy link
Collaborator

Hi there!
I'm sorry you're experiencing this issue. Could you please send me the bug report code so I can investigate your project further?
Thank you, I look forward to your response.

@Juansarmi Juansarmi self-assigned this May 2, 2025
@Juansarmi Juansarmi added the status: needs information More information/context is needed for assessment. label May 2, 2025 — with Linear
@VPATEL007
Copy link
Author

I already mentiond all detail please check those

@VPATEL007
Copy link
Author

the project id
magic-c-r-m-etxxf2

Copy link
Collaborator

Hi again!
I've carefully reviewed the issues you're experiencing, but in order to proceed with the investigation, I'll need the Bug Report Code.
Looking forward to your response.

Best regards

@VPATEL007
Copy link
Author

But how can i find bug report code already shared all detail which is you required

@VPATEL007
Copy link
Author

when i generrate the get bug report code in flutterflow that time its show below error how can i generated the bug report code

Failure to copy to clipboard: PlatformException(copy_fail, Clipboard.setData failed, null, null)

@VPATEL007
Copy link
Author

IT4si/Ll7Y91j7xa+KXxbcFR/TwROWJ7U780scpCbw4bIYj2P4lzY876P1NCOMu4TWxIPWCcp14Jp9rNuM71Lvc6YBeVGq56+bV+Txf/cHG5Wq2TF7iWYH99L99QG2qa5JizhhZ/JrdZdVoO2meMG9y/ShDrNrrWIUQ8Sq/LZO4=

this is the bug report code

Copy link
Collaborator

Hi again!
I understand that your issue is related to a custom integration. Normally, this channel is intended for reporting reproducible platform bugs rather than providing support for custom integrations.

That said, I’ve reviewed your project and noticed a warning in your custom widget, which could be the cause of the issue.

Captura de pantalla 2025-05-05 142125.png

Try using a compatible version and see if that helps.

Best regards

@Juansarmi Juansarmi removed the status: needs triage A potential issue that has not been confirmed as a bug. label May 5, 2025
@VPATEL007
Copy link
Author

i have removed this libraries which is version issue but still faced same issue

@VPATEL007
Copy link
Author

the issue was on particular event not shown on calendar actually only calendar is show but event is not showing

Copy link
Collaborator

Hello again!
In this case, the best recommendation I can give you is to reach out to our support team — they’ll be able to assist you with this custom integration.
You can contact them via the in-app chat or by email at [email protected] . They have the necessary tools to ensure everything is set up correctly in your project.
Best regards.

@Juansarmi Juansarmi removed the status: needs information More information/context is needed for assessment. label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants