syncfusion / flutter-examples

This repository contains the Syncfusion Flutter UI widgets examples and the guide to use them.
Other
1.97k stars 776 forks source link

Example is not working #367

Closed ronytesler closed 3 years ago

ronytesler commented 3 years ago

I cloned the code, then ran 'flutter packages get':


C:\flutter-examples>flutter packages get
Because every version of syncfusion_flutter_signaturepad from git depends on syncfusion_flutter_core from git {url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com/essential-studio/flutter-core, ref:
release/19.1.0.1, path: syncfusion_flutter_core} and every version of syncfusion_flutter_maps from git depends on syncfusion_flutter_core from git {url: https://buildautomation:Coolcomp299@gitlab.syncfusion.com
/essential-studio/flutter-core, ref: development, path: syncfusion_flutter_core}, syncfusion_flutter_signaturepad from git is incompatible with syncfusion_flutter_maps from git.
So, because flutter_examples depends on both syncfusion_flutter_maps from git and syncfusion_flutter_signaturepad from git, version solving failed.
Running "flutter pub get" in flutter-examples...
pub get failed (1; So, because flutter_examples depends on both syncfusion_flutter_maps from git and syncfusion_flutter_signaturepad from git, version solving failed.)
Dharanipalani commented 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

ronytesler commented 3 years ago

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.

Dharanipalani commented 3 years ago

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. image

Please revert us if you need any further assistance on this.

Thanks, Dharanitharan. P

ronytesler commented 3 years ago

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.

Dharanipalani commented 3 years ago

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

ronytesler commented 3 years ago

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.

ronytesler commented 3 years ago

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.

Dharanipalani commented 3 years ago

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

ronytesler commented 3 years ago

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..

Dharanipalani commented 3 years ago

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

alexandr-efimov commented 2 years ago

Hi, there is no sample_view.dart file now in repo, but some examples reffers it!