Comments (2)
@Timememory6 You are creating new instance of EventController
every time. That won't work. You have to create only one instance of EventController
and pass it to WeekView
. Also, Use same instance to add events as well.
ex,
class WeekCalendar extends StatelessWidget {
final controller = EventController();
@override Widget build(BuildContext context) {
return Scaffold(
body: WeekView(
controller: controller,
showLiveTimeLineInAllDays: true,
width: 400,
heightPerMinute: 1,
eventArranger: SideEventArranger(),
onDateLongPress: (time) {
try {
final event = CalendarEventData(
date: DateTime(2022, 6, 17),
startTime: DateTime(2022, 6, 17, 15),
endTime: DateTime(2022, 6, 17, 18),
event: "Event 1",
title: 'test',
);
controller.add(event);
print(controller.getEventsOnDay(DateTime(2022, 6, 17)));
} catch (e) {
print(e);
}
},
),
);
}
}
from flutter_calendar_view.
Please, let us know if this issue is resolved by above example.
from flutter_calendar_view.
Related Issues (20)
- Event tile builder: minimum tile height
- Hide header in Week View HOT 2
- How to add a custom widget at the current time when clicking on onDateTap in the weekly view?
- Weekday border dose not change with monthview show border false HOT 1
- Week View Full Day Events Header Title
- Week view and minuteSlot dimming ? HOT 1
- Min/max hour for week and day view HOT 4
- Scroll issue in DayView HOT 1
- Remove all event from Calendar HOT 2
- Lock horizontal scroll HOT 1
- How to hide date in column header? HOT 3
- How to get tap location in onDateTap, onEventTap callbacks? HOT 2
- How to change selected day in MonthView? HOT 1
- How to limit start and end hours in WeekView? HOT 1
- Apply filter for full day's events HOT 1
- Can set width for each day in weekday view and swipe horizontally?
- Why does DayView.onEventTap return a list? HOT 2
- MonthView cellBuilder - titleColor not showing correct colour HOT 1
- Hide days from previois and next month in month view HOT 1
- WeekView events onEventTap does not get triggered for the current week. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_calendar_view.