Closed ronytesler closed 3 years ago
Hi @ronytesler,
We apologize for the inconvenience. We have merged the modifications, please pull, and try to get the packages and it will get them now.
Thanks, Dharanitharan. P
Thanks. Actually I needed only the calendar so I deleted the rest. It would be much easier to take code samples when each feature is in its own project. When all the features are in one project, it takes more time to isolate the relevant files and code. But I understand if that's too much work.
Hi @ronytesler,
Most welcome and thanks for the revert. We would like to tell you that you can simply ignore other widget related files by commenting them in the sample_list.dart and sample_details.json files.
Please revert us if you need any further assistance on this.
Thanks, Dharanitharan. P
I get this error: LateInitializationError: Field 'themeData' has not been initialized. So I still need to take code from different places in the large example project. I guess I need to take this code from sample_browser.dart:
home: Builder(builder: (BuildContext context) {
_sampleListModel.systemTheme = Theme.of(context);
_sampleListModel.currentThemeData ??=
(_sampleListModel.systemTheme.brightness != Brightness.dark
? ThemeData.light()
: ThemeData.dark());
_sampleListModel.changeTheme(_sampleListModel.currentThemeData!);
and use it in my own MaterialApp.
Hi @ronytesler,
We investigated your query and were unable to reproduce the reported issue on our end. We would like to point out that you only need to comment or remove the unwanted widgets; there's no need to edit or remove any other project-related code because all other widgets are dependent on them. As a result, just commenting out the undesired widgets will solve your problem and allow you to execute the required widgets.
Please revert us if you need any further assistance on this.
Thanks, Dharanitharan. P
I get this error: LateInitializationError: Field 'themeData' has not been initialized. So I still need to take code from different places in the large example project. I guess I need to take this code from sample_browser.dart:
home: Builder(builder: (BuildContext context) {
_sampleListModel.systemTheme = Theme.of(context);
_sampleListModel.currentThemeData ??=
(_sampleListModel.systemTheme.brightness != Brightness.dark
? ThemeData.light()
: ThemeData.dark());
_sampleListModel.changeTheme(_sampleListModel.currentThemeData!);
and use it in my own MaterialApp.
I know, but if I want to copy the code to my project, it's more complicated because I need to take code from different places in the project.
Hi @ronytesler,
We have done the necessary changes and attached a sample that simply contains a calendar widget, as per your request. As previously said, we removed the other widgets' data from the sample details.json file and sample list.dart in this sample, and it now works perfectly with just the calendar widget. We did not have any issues with the theme, as you stated, and please feel free to use the accompanying sample as a guide. You can do the same thing for the remaining required widgets on your own, and please let us know if you still have problems with more information, this will help us analyze your case and find a solution for you faster.
Sample: lib.zip
Thanks, Dharanitharan. P
Thanks! I could also run the project with no problem after removing the other features. I'm just saying it's more complicated to copy the code to my own project. I already did it and it worked, but it wasn't that simple. When I tried to copy the CalendarAppointmentEditor class, I had to also copy the getting_started.dart, model.dart and sample_view.dart files. I deleted some of the code from them, but I'm sure I have unnecessary code in my project. Anyway it does work..
Hi @ronytesler,
Most welcome and thanks for the revert. Yes, if you want to copy to your own project, then it shows additional errors, and you want to copy the other related files of them. We hope you got the solution and please revert us if you need any further assistance and we are always happy on assisting you.
Thanks, Dharanitharan. P
Hi, there is no sample_view.dart file now in repo, but some examples reffers it!
I cloned the code, then ran 'flutter packages get':