Thank you,it's very good video.We want another one that create start date and end date to each event,then displays this event in all days between them.
how can we do it? right now we can only click to see the event list, wouldn't it be nicer when user open the calendar, it will show dots and the event list?
Thanks for your videos and app. I have learnt a lot. But I would like to add 2 more function to this app, but as a beginner I can't. One is the delete function. (I thought it will be easy regarding to your Firestore crud video, but it is totally different structure, and I am lost.) The next question is, how could be solve that, when I enter the app, then I shouldn't click to today to see the today's tasks (I mean the selected events = today's events). I think I should do stg with the onSelected part. And one more thing, is there a "long form" or any explanation what this part means: " ..._selectedEvents.map( (event) => " What does ... mean?
Awesome video! You have really done a great job! I have the same code as you right now but how could I make the list of items update realtime (as soon as the user adds or deletes the items)? Thank you in advance for your help.
Thank you for the video. right now we can only click to see the event list, wouldn't it be nicer when user open the calendar, it will show dots and the event list?How can we do it?
Well, the firestore CRUD for any data is same so you should easily understand, how you can do that following this Firestore CRUD crash course ua-cam.com/video/rpNPaVy1BvU/v-deo.html
I have learnt a lot. But I would like to add 2 more function to this app, but as a beginner I can't. One is the delete function. (I thought it will be easy regarding to your Firestore crud video, but it is totally different structure, and I am lost.) In my Firestore ID is null
Many thanks for the great tutorial! I am designing a calendar to be used by multiple team members. I need to apply a colour of the individual days on the calendar according to the type of the current user's events and then show a list of the other user's events below the Calendar. Do you know if it is possible to do this with Table Calendar? Calendar Carousel has a markedDatesMap property, does Table Calendar have an equivalent?
There are two ways 1. Assign user if to the event created and while loading filter by that user id or 2. Create events in sub collection for each user instead of events collection
Thank you for the video! Do you know how the approach will be, if my date in the firebase collection is a string? I am really struggling with converting example: "29-05-2020" to a datetime that i am able to use for the calender.
use DateTime.parse to parse string to date time object, however best to save as datetime or milliseconds if you are creating from other backend as well, you can save date as date
Hi.! first thanks for all the videos yo make you are genius...second: I'm using your firebase starter template for a project and also the table calendar.. my question is, how can I change the language of the table calendar the same way you use localizations in the firebase template? I changed the language using locale: "es" but I guess with this will be always in spanish. sorry if this is a silly question and just learning...
ok I search a little bit and found the solution if somebody need it: instead of call a specific language (locale: "es") use this locale: Localizations.localeOf(context).languageCode
Hi, im using the mostly part of this tutorial to make a part of my project, but now i have a problem, in the first part of the main code you have the routes, well, my problem is that my main doesn't the central UI part and when im triying to put the routes un my main says that the method AddEventPage isn't defined for the class "MyApp", do hoy have any idea about how can i do?
Please learn more about routing in flutter. And it's saying isn't defined means you must have forgotten to import the page containing the AddEventPage.
Thanks for sharing, in my requirement, I need to display all the events based on the selection(month, 2 weeks, week ). How do I know what they selected on the top of calendar?
Another exception was thrown: NoSuchMethodError: The method 'streamList' was called on null. Hoe can i solve this problem? I put the calender in another file not in the main.dart,and i made a button when i press it ,it navigates to the calender
Damodar Lohani, thanks for the tutorials they are really helpful. I have spent hours at this specific tutorial since its most appropriate to what I want to do in an app. However, I cannot seem to get the the data from Add event form to the database, its in a timeless loop but does not populate in the firestore database. Please help!!
The additional challenge is there are no errors in the console, however the build.gradle under the android app has an error from the GradleException ("Flutter SDK not found........")
Hi, there are changes in firebase_helpers Package: "Breaking change -> updateItem is no longer available". error: The method 'updateItem' isn't defined for the type 'DatabaseService'.
Hey guys, i fixed! where was "updateItem...." now is: await eventDBS.updateData(widget.note.id, { "title": _title.text, "description": _description.text, "eventDate": _eventDate });
Try changing within the widget.note!=null to await eventDBS.updateData(widget.note.id,{ 'title': _title.text, 'description': _description.text, 'eventDate': widget.note.eventDate }); I'm still a beginner, not very sure if its the right way. But it works for me now. Cheers!
hi, thank you for the video.... but i have a question. I have event as the subcollection from user, the problem I face is with the query from firebase helper. in this video, the query is for event as the parent collection. how about if the event as subcollection. is there any idea? Thank you for any response
for subcollection just provide the collection path we are providing with the appended parent collection and parent id so instead of "events" pass "users//events" as the collection path parameter. :)
Not possible at the moment, check the my fork of the calendar has the header builder which you can use to customize header github.com/lohanidamodar/table_calendar
In firestore you can make event data list instead of single data to add multiple dates, and where you display in calendar, you need to duplicate the event for each date in the list
You have to manually add the event to each date separately, you can use range picker to save date range in db however when you want to display in flutter calendar, you have to add event to each date.
Hi, This is one of the functional scenario based tutorial. Thank you I used your github code for add_event page and this line gives an error await eventDBS.updateItem(EventModel() when I check the documentation it is updateData not updateItem. When i change it to update data, it expects string parameter Im confused . Please help
use the new function updateItem(id, data as map), check the source for details (github.com/lohanidamodar/flutter_firebase_helpers/blob/afa4a7b265fe3d7153ae5b33bd331d953a2ee986/lib/src/firestore_service.dart#L243)
@@appwriters Thank you for your reply, I dont understand what Id i need to pass ?? please can you update your code on git hub so evenryone who are following your tutorials can update their code accordingly. thanks for your help
React Bits (Damodar Lohani) I’m using UID for the rest of the project, not sure how to implement in this situation, thanks for your time , great videos
I have issue in Dart analysis "error: This requires the 'spread-collections' experiment to be enabled." and tried these solutions nothing worked : stackoverflow.com/questions/55477046/how-can-i-enable-flutter-dart-language-experiments
Thank you Sir, your videos are very informative , keep the good work !
Thank you for the help
Thanks, Nice video.
nice video
this video is only one of it's kind , please make more of it
Sure. Thank you for your suggestion
You are amazing!
Thank you so much. I am no different, I just keep learning, you keep doing that too.. You are here means you are amazing too.
Thank you,it's very good video.We want another one that create start date and end date to each event,then displays this event in all days between them.
Thanks for the idea! I have planned an updated tutorial on flutter calendar + firestore. Do provide more suggestions if you have any.
thank you a lot for the video! It's real quality content
Thank you.
Thank you so much.
Thanks a lot for this tutorial! I would suggest to play with map update function to maintain the events list up to date.
You got this?
how can we do it? right now we can only click to see the event list, wouldn't it be nicer when user open the calendar, it will show dots and the event list?
Thanks u for knowledge sir❤️
Thanks for your videos and app. I have learnt a lot. But I would like to add 2 more function to this app, but as a beginner I can't.
One is the delete function. (I thought it will be easy regarding to your Firestore crud video, but it is totally different structure, and I am lost.)
The next question is, how could be solve that, when I enter the app, then I shouldn't click to today to see the today's tasks (I mean the selected events = today's events). I think I should do stg with the onSelected part.
And one more thing, is there a "long form" or any explanation what this part means:
" ..._selectedEvents.map(
(event) => "
What does ... mean?
You got this?
Awesome video! You have really done a great job! I have the same code as you right now but how could I make the list of items update realtime (as soon as the user adds or deletes the items)? Thank you in advance for your help.
Thank you for the video. right now we can only click to see the event list, wouldn't it be nicer when user open the calendar, it will show dots and the event list?How can we do it?
thanks for this tutorial! Could you please do a new version with some new functions? Like delete events, notify for an event..? thanks so much again!
Well, the firestore CRUD for any data is same so you should easily understand, how you can do that following this Firestore CRUD crash course
ua-cam.com/video/rpNPaVy1BvU/v-deo.html
Hi is there any video that helps me to create dummy events from a dummy events model and select the events from there
Thanks for sharing .But calendar 3 final version not displaying the saved events ! Only saving in fire store database. Kindly guide if possible
I am not sure what's wrong, try to clone and run the project linked in the description and compare with your code
for me it was the same. I think the last updates he added are not updated
I had the same error. To solve it, I cleaned database
I have the same error, I cleaned the database, and still the issue
Hi, I'm new to developing in flutter, I'm trying to implement the code in my application but when I send a task, it generates the following exception. Could you recommend something?
E/flutter ( 7961): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: The getter 'eventDate' was called on null.
E/flutter ( 7961): Receiver: null
E/flutter ( 7961): Tried calling: eventDate
E/flutter ( 7961): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
E/flutter ( 7961): #1 _AddEventPageState.build.
package:task19/pages/add_event.dart:115
E/flutter ( 7961): #2 _InkResponseState._handleTap
package:flutter/…/material/ink_well.dart:985
E/flutter ( 7961): #3 _InkResponseState.build.
package:flutter/…/material/ink_well.dart:1101
E/flutter ( 7961): #4 GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:183
E/flutter ( 7961): #5 TapGestureRecognizer.handleTapUp
package:flutter/…/gestures/tap.dart:598
E/flutter ( 7961): #6 BaseTapGestureRecognizer._checkUp
package:flutter/…/gestures/tap.dart:287
E/flutter ( 7961): #7 BaseTapGestureRecognizer.acceptGesture
package:flutter/…/gestures/tap.dart:259
E/flutter ( 7961): #8 GestureArenaManager.sweep
package:flutter/…/gestures/arena.dart:157
E/flutter ( 7961): #9 GestureBinding.handleEvent
package:flutter/…/gestures/binding.dart:372
E/flutter ( 7961): #10 GestureBinding.dispatchEvent
package:flutter/…/gestures/binding.dart:348
E/flutter ( 7961): #11 RendererBinding.dispatchEvent
package:flutter/…/rendering/binding.dart:268
E/flutter ( 7961): #12 GestureBinding._handlePointerEventImmediately
package:flutter/…/gestures/binding.dart:303
E/flutter ( 7961): #13 GestureBinding.handlePointerEvent
package:flutter/…/gestures/binding.dart:267
E/flutter ( 7961): #14 GestureBinding._flushPointerEventQueue
package:flutter/…/gestures/binding.dart:225
E/flutter ( 7961): #15 GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:208
E/flutter ( 7961): #16 _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter ( 7961): #17 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter ( 7961): #18 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter ( 7961): #19 _invoke1 (dart:ui/hooks.dart:265:10)
E/flutter ( 7961): #20 _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)
E/flutter ( 7961):
I had the same issue. Please advise
Checkout the updated tutorial
ua-cam.com/video/OmoQHhej4gE/v-deo.html
Checkout the updated tutorial ua-cam.com/video/OmoQHhej4gE/v-deo.html
I have learnt a lot. But I would like to add 2 more function to this app, but as a beginner I can't.
One is the delete function. (I thought it will be easy regarding to your Firestore crud video, but it is totally different structure, and I am lost.)
In my Firestore ID is null
Many thanks for the great tutorial! I am designing a calendar to be used by multiple team members. I need to apply a colour of the individual days on the calendar according to the type of the current user's events and then show a list of the other user's events below the Calendar. Do you know if it is possible to do this with Table Calendar? Calendar Carousel has a markedDatesMap property, does Table Calendar have an equivalent?
You have a individual day builders, that you can use but might take extra work. Haven't tried something like that.
Thank you for the vidoes ...
Can you show us how to link each data to its user ❤❤
There are two ways 1. Assign user if to the event created and while loading filter by that user id or 2. Create events in sub collection for each user instead of events collection
hi...thanks for your tutorial...do you have any tutorial for loading events from mysql database?thanks in advance
Yeahh @React Bits (Damodar Lohani) can you show this tutorial?
Thank you for the video! Do you know how the approach will be, if my date in the firebase collection is a string? I am really struggling with converting example: "29-05-2020" to a datetime that i am able to use for the calender.
use DateTime.parse to parse string to date time object, however best to save as datetime or milliseconds if you are creating from other backend as well, you can save date as date
Hi.! first thanks for all the videos yo make you are genius...second: I'm using your firebase starter template for a project and also the table calendar.. my question is, how can I change the language of the table calendar the same way you use localizations in the firebase template? I changed the language using locale: "es" but I guess with this will be always in spanish. sorry if this is a silly question and just learning...
ok I search a little bit and found the solution if somebody need it: instead of call a specific language (locale: "es") use this locale: Localizations.localeOf(context).languageCode
Hi, very good tutorial. Quick question, if I have a list of dates in an array, how can I add them as events in table_calendar? Thank you.
You need to convert those into the same format Map to display in table calendar
@@appwriters Thank you. Would be nice if you could give me an example or share a link. I'm new to flutter.
@@coolboylp Please learn more about array and map manipulation in dart and basics of flutter.
Hi, im using the mostly part of this tutorial to make a part of my project, but now i have a problem, in the first part of the main code you have the routes, well, my problem is that my main doesn't the central UI part and when im triying to put the routes un my main says that the method AddEventPage isn't defined for the class "MyApp", do hoy have any idea about how can i do?
Please learn more about routing in flutter. And it's saying isn't defined means you must have forgotten to import the page containing the AddEventPage.
Thanks for sharing, in my requirement, I need to display all the events based on the selection(month, 2 weeks, week ). How do I know what they selected on the top of calendar?
check visibleDays property of the CalendarController
Another exception was thrown: NoSuchMethodError: The method 'streamList' was called on null.
Hoe can i solve this problem?
I put the calender in another file not in the main.dart,and i made a button when i press it ,it navigates to the calender
The answer is in the error whatever you are calling streamList from its null. I can't help you more without viewing the code.
hello friend,good video from spain. Can i save the events on mobile disk? Thanks a lot
Of course you can store any where you like, check this
ua-cam.com/video/jhtKTKn6PlI/v-deo.html
Ith there any way to pick few days with DayPicker for one event by one function? Somesing like it can do range picker
I believe there is no default such behavior. Check out (pub.dev/packages/date_range_picker)
can u make local notification from calendar event?
You can use local notifications plugin to achieve that
How can I filter events according to same titles ??
Damodar Lohani, thanks for the tutorials they are really helpful. I have spent hours at this specific tutorial since its most appropriate to what I want to do in an app. However, I cannot seem to get the the data from Add event form to the database, its in a timeless loop but does not populate in the firestore database. Please help!!
The additional challenge is there are no errors in the console, however the build.gradle under the android app has an error from the GradleException ("Flutter SDK not found........")
Check the updated tutorial series on Flutter calendar as well
@@appwriters can you provide the link to the updated series
Hi, there are changes in firebase_helpers Package: "Breaking change -> updateItem is no longer available".
error: The method 'updateItem' isn't defined for the type 'DatabaseService'.
Hey guys, i fixed!
where was "updateItem...."
now is:
await eventDBS.updateData(widget.note.id, {
"title": _title.text,
"description": _description.text,
"eventDate": _eventDate
});
Try changing within the widget.note!=null to
await eventDBS.updateData(widget.note.id,{
'title': _title.text,
'description': _description.text,
'eventDate': widget.note.eventDate
});
I'm still a beginner, not very sure if its the right way. But it works for me now. Cheers!
Yes the updateItem is no longer available, you need to use updateData(String id, Map data). Thank you.
Where can I find the updateItem and createItem method? First of all, Thanks
Facing the updateItem issue, can anybody help?
Recent version does not contain updateItem, use updateData(String id, Map data), createItem is working as usual
hi, thank you for the video.... but i have a question. I have event as the subcollection from user, the problem I face is with the query from firebase helper. in this video, the query is for event as the parent collection. how about if the event as subcollection. is there any idea? Thank you for any response
for subcollection just provide the collection path we are providing with the appended parent collection and parent id so instead of "events" pass "users//events" as the collection path parameter. :)
@@appwriters what should i put in ? how can i implement the user current id instead? sorry, i am new in firebase flutter
Can this calender add date range for events??
No not yet date range
How to customize calendar header, I mean changing the positions of header items
Not possible at the moment, check the my fork of the calendar has the header builder which you can use to customize header
github.com/lohanidamodar/table_calendar
Hi guys,
I followed the video and I can save information on firebase but, I not able to see the note in the calendar? any ideas?
Thanks
Compare your code with the repository provided in the description.
@@appwriters Thanks for your quick response, I compared with your GitHub code and I followed the steps from this video.
@@ChristianMora Try clone and run the code from Github as well, if it works then something is missing
@@appwriters Here is my code from main.dart
class _CalendarioState extends State {
CalendarController _controller;
Map _events;
List _selectedEvents;
@override
void initState() {
super.initState();
_controller = CalendarController();
_events = {};
_selectedEvents = [];
}
Map _groupEvents(List events) {
Map data = {};
events.forEach((event) {
DateTime date = DateTime(event.eventDate.year, event.eventDate.month,
event.eventDate.day, 12);
if(data[date] == null) data[date] = [];
data[date].add(event);
});
return data;
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Calendar'),
),
body: StreamBuilder(
stream: eventDBS.streamList(),
builder: (context, snapshot) {
if(snapshot.hasData) {
List allEvents = snapshot.data;
if(allEvents.isNotEmpty) {
_events = _groupEvents(allEvents);
}
}
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TableCalendar(
events: _events,
initialCalendarFormat: CalendarFormat.week,
calendarStyle: CalendarStyle(
canEventMarkersOverflow: true,
todayColor: Colors.orange,
selectedColor: Theme.of(context).primaryColor,
todayStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
color: Colors.white)),
headerStyle: HeaderStyle(
centerHeaderTitle: true,
formatButtonDecoration: BoxDecoration(
color: Colors.orange,
borderRadius: BorderRadius.circular(20.0),
),
formatButtonTextStyle: TextStyle(color: Colors.white),
formatButtonShowsNext: false,
),
startingDayOfWeek: StartingDayOfWeek.monday,
builders: CalendarBuilders(
selectedDayBuilder: (context, date, events) => Container(
margin: const EdgeInsets.all(4.0),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(10.0)),
child: Text(
date.day.toString(),
style: TextStyle(color: Colors.white),
)),
todayDayBuilder: (context, date, events) => Container(
margin: const EdgeInsets.all(4.0),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.orange,
borderRadius: BorderRadius.circular(10.0)),
child: Text(
date.day.toString(),
style: TextStyle(color: Colors.white),
)),
),
calendarController: _controller,
),
..._selectedEvents.map((event) => ListTile(
title: Text(event.title),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => EventDetailsPage(
event: event,
)));
},
)),
],
),
);
}
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () => Navigator.pushNamed(context, 'add_event'),
),
);
}
}
@@appwriters I will do that, thanks again!!
Sir please, I need to know , how can I change the color of the dots that represent the number of events ona specific date?
check markersBuilder property
Thanks , how i can add a lot of dates to the same event
In firestore you can make event data list instead of single data to add multiple dates, and where you display in calendar, you need to duplicate the event for each date in the list
Is it possible to make (event_date)as an array, the event repeats more than once a week ?
You have to manually add the event to each date separately, you can use range picker to save date range in db however when you want to display in flutter calendar, you have to add event to each date.
@@appwriters Thanks ... but I want to add a lot of dates to the same event ...
I have question, can I use it as share calender with my friends in work ? How?
You have to build :>
Hi, This is one of the functional scenario based tutorial. Thank you
I used your github code for add_event page and this line gives an error
await eventDBS.updateItem(EventModel()
when I check the documentation it is updateData not updateItem.
When i change it to update data, it expects string parameter
Im confused . Please help
use the new function updateItem(id, data as map), check the source for details (github.com/lohanidamodar/flutter_firebase_helpers/blob/afa4a7b265fe3d7153ae5b33bd331d953a2ee986/lib/src/firestore_service.dart#L243)
@@appwriters Thank you for your reply, I dont understand what Id i need to pass ?? please can you update your code on git hub so evenryone who are following your tutorials can update their code accordingly. thanks for your help
I got the solution thank you
how to add repeated events options ?
At this point I think you need to duplicate the events
why my event cant object.. under selected event
What do you mean?
@@appwriters done thanks.. just stuck because event.description not auto. i think error but just not auto
Any Idea on getting the UID in the streambuilder
You need to implement firebase auth and some state management solution to provide currently signed in user
React Bits (Damodar Lohani) I’m using UID for the rest of the project, not sure how to implement in this situation, thanks for your time , great videos
Send me the previous video link
ua-cam.com/video/jhtKTKn6PlI/v-deo.html
ua-cam.com/video/AR-9ArLSiNY/v-deo.html
@@appwriters I did that one, first time, I got some error.
I have issue in Dart analysis "error: This requires the 'spread-collections' experiment to be enabled."
and tried these solutions nothing worked : stackoverflow.com/questions/55477046/how-can-i-enable-flutter-dart-language-experiments
If you are using the latest version of Flutter and dart this should not occur, please check your flutter and dart version (flutter doctor -v)
Change this in your pubspec.yaml file :
environment:
sdk: ">=2.7.0
The Github repo is really deprecated, please update it. Its getting real messy.
I will make sure to check it out
Source Code ?
Please Check the github link in the description.
firestore Helpers not working!! fail!!
firebase_helpers plugin has updated, and there are few changes, check the changelog of the plugin, to make it work