../../.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_calendar-20.4.51/lib/src/calendar/sfcalendar.dart:10776:71: Error: A value of type 'RenderAbstractViewport?' can't be returned from a function with return type 'RenderAbstractViewport' because 'RenderAbstractViewport?' is nullable and 'RenderAbstractViewport' isn't.
- 'RenderAbstractViewport' is from 'package:flutter/src/rendering/viewport.dart' ('../flutter/packages/flutter/lib/src/rendering/viewport.dart').
RenderAbstractViewport get _stackViewPort => RenderAbstractViewport.of(this);
My pubspec.yaml file has the following:
cupertino_icons: ^1.0.2
firebase_core: ^2.7.0
firebase_auth: ^4.2.9
cloud_firestore: ^4.4.3
syncfusion_flutter_calendar: ^20.4.51
provider: ^6.0.3
syncfusion_flutter_datagrid: ^20.4.51
syncfusion_flutter_datagrid_export: ^20.4.51-beta
syncfusion_flutter_core: ^20.4.51
syncfusion_flutter_pdf: ^20.4.51
html: ^0.15.1
intl: ^0.17.0
url_launcher: ^6.1.7
fancy_password_field: ^2.0.0
universal_html: ^2.0.8
Flutter doctor shows:[✓] Flutter (Channel stable, 3.3.4, on macOS 13.1 22C65 darwin-arm, locale en-US)
• Flutter version 3.3.4 on channel stable at /Users/martinp/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision eb6d86ee27 (5 months ago), 2022-10-04 22:31:45 -0700
• Engine revision c08d7d5efc
• Dart version 2.18.2
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/martinp/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.100
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
I'm unsure how to resolve.
Went ahead and tried updating to a very new version of Flutter - below is the output from Flutter doctor -v:[✓] Flutter (Channel stable, 3.7.5, on macOS 13.1 22C65 darwin-arm64, locale en-US)
• Flutter version 3.7.5 on channel stable at /Users/martinp/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c07f788888 (5 hours ago), 2023-02-22 17:52:33 -0600
• Engine revision 0f359063c4
• Dart version 2.19.2
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/martinp/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.100
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Below is the set of issues I'm seeing when I try to compile that seem to be centered on syncfusion xlsio:
Waiting for connection from debug service on Chrome...
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:419:54: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('algorithmName', sheet._algorithmName);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/worksheet/worksheet.dart:1786:11: Context: '_algorithmName' refers to a property so it couldn't be promoted.
See http://dart.dev/go/non-promo-property
String? _algorithmName;
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:902:51: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('tooltip', link.screenTip);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/hyperlinks/hyperlink.dart:63:11: Context: 'screenTip' refers to a property so it couldn't be promoted.
See http://dart.dev/go/non-promo-property
String? screenTip;
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:905:51: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('display', link.textToDisplay);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/hyperlinks/hyperlink.dart:85:11: Context: 'textToDisplay' refers to a property so it couldn't be promoted.
See http://dart.dev/go/non-promo-property
String? textToDisplay;
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:991:59: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
'tooltip', picture.hyperlink!.screenTip);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:1666:62: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
'ContentType', _workbook._defaultContentTypes[key]);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:2636:45: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('text', condition.text);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:3323:57: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('id', dataBarImpl._stGUID);
^
Failed to compile application.
Martin,
# Regarding the Flutter SfCalendar query
Based on the instructions provided, we attempted to replicate the reported issue but were unable to do so. A sample has been created and is attached, including the output from testing.
Please be aware that the version of SfCalendar used in this test is 20.4.51 and Flutter version is 3.7.5.
We suggest updating to the latest version of Flutter and re-testing the issue. If the problem persists, please inform us.
# Regarding the Flutter XlsIO query
We request you to upgrade your flutter SDK version and check if the issue is resolved. If the issue still persists, kindly share us that SDK version to investigate the query further.
Thank you, I have been able to upgrade the SDK version to 3.7.5. The SfCalendar is no longer giving a compile-time error. However, the XLsIO package is. Details of the build error and Flutter doctor are as follows:
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:419:54: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('algorithmName', sheet._algorithmName);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/worksheet/worksheet.dart:1786:11: Context: '_algorithmName' refers to a property so it couldn't be promoted.
See http://dart.dev/go/non-promo-property
String? _algorithmName;
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:902:51: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('tooltip', link.screenTip);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/hyperlinks/hyperlink.dart:63:11: Context: 'screenTip' refers to a property so it couldn't be promoted.
See http://dart.dev/go/non-promo-property
String? screenTip;
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:905:51: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('display', link.textToDisplay);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/hyperlinks/hyperlink.dart:85:11: Context: 'textToDisplay' refers to a property so it couldn't be promoted.
See http://dart.dev/go/non-promo-property
String? textToDisplay;
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:991:59: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
'tooltip', picture.hyperlink!.screenTip);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:1666:62: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
'ContentType', _workbook._defaultContentTypes[key]);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:2636:45: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('text', condition.text);
^
../../.pub-cache/hosted/pub.dev/syncfusion_flutter_xlsio-20.4.51-beta/lib/src/xlsio/general/serialize_workbook.dart:3323:57: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('id', dataBarImpl._stGUID);
^
My pubspec.yaml file for dependencies is as follows:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
firebase_core: ^2.7.0
firebase_auth: ^4.2.9
cloud_firestore: ^4.4.3
syncfusion_flutter_calendar: ^20.4.51
provider: ^6.0.3
syncfusion_flutter_datagrid: ^20.4.51
syncfusion_flutter_datagrid_export: ^20.4.51-beta
syncfusion_flutter_core: ^20.4.51
syncfusion_flutter_pdf: ^20.4.51
html: ^0.15.1
intl: ^0.17.0
url_launcher: ^6.1.7
fancy_password_field: ^2.0.0
universal_html: ^2.0.8
Flutter doctor is as follows:
[✓] Flutter (Channel stable, 3.7.5, on macOS 13.1 22C65 darwin-arm64, locale en-US)
• Flutter version 3.7.5 on channel stable at /Users/martinp/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c07f788888 (5 hours ago), 2023-02-22 17:52:33 -0600
• Engine revision 0f359063c4
• Dart version 2.19.2
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/martinp/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.100
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Any help is much appreciated!
Thank you!
Martin
Martin, we will resolve this issue and include the fix in our next weekly NuGet release scheduled for February 28th,2023.
Thank you!
I assume that this new package will be published to pub.dev for installation as a package into Flutter?
Yes, Martin. A new version of Syncfusion Flutter XlsIO will be published in pub.dev
Martin, we have resolved the issue in our latest version 20.4.52. Kindly upgrade to this latest version and let us know if this helps.
Latest Package: https://pub.dev/packages/syncfusion_flutter_xlsio/versions/20.4.52-beta
Thanks - so far the update seems to be working!
We are glad that the latest package did resolve your issue, Martin.
hello Syncfusion Team
I want to use the syncfusion_flutter_calendar package in app so I have use but i got error .I have try all the above solution but not solve .
I have this version in install .
/home/developers/flutter_linux_3.3.10-stable/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 3.3.10, on Ubuntu 20.04.3 LTS 5.14.0-1059-oem, locale en_IN)
• Flutter version 3.3.10 on channel stable at /home/developers/flutter_linux_3.3.10-stable/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (5 months ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /home/developers/Android/Sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✗] Linux toolchain - develop for Linux desktop
✗ clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
• pkg-config version 0.29.1
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[✓] Android Studio (version 4.0)
• Android Studio at /home/developers/android-studio
• Flutter plugin version 51.0.1
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (3 available)
• KFSUWI (mobile) • G000N607810404JG • android-arm • Android 5.1.1 (API 22)
• Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.3 LTS 5.14.0-1059-oem
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.102
[✓] HTTP Host Availability
• All required HTTP hosts are available
Getting Error -
^
../../flutter_linux_3.3.10-stable/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_calendar-21.2.6/lib/src/calendar/resource_view/resource_view.dart:124:9: Error: A constant constructor can't call a non-constant super constructor.
: super(children: children);
^
../../flutter_linux_3.3.10-stable/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_calendar-21.2.6/lib/src/calendar/sfcalendar.dart:10776:71: Error: A value of type 'RenderAbstractViewport?' can't be returned from a function with return type 'RenderAbstractViewport' because 'RenderAbstractViewport?' is nullable and 'RenderAbstractViewport' isn't.
- 'RenderAbstractViewport' is from 'package:flutter/src/rendering/viewport.dart' ('../../flutter_linux_3.3.10-stable/flutter/packages/flutter/lib/src/rendering/viewport.dart').
RenderAbstractViewport get _stackViewPort => RenderAbstractViewport.of(this);
Please help me.
Hi Krishna,
As per the shared information, we have checked the issue “A constant constructor can't call a non-constant
super constructor” in the simple sample of the Flutter calendar. But we are
unable to reproduce the mentioned issue, it was working fine as expected from
our end.
Tested details:
1. Flutter version: Stable channel-3.10.1
2. Flutter Date Picker version: 21.2.5
Kindly update the Flutter version to latest version 3.10.1 then check and let us know still if you are facing the same issue, please share the below details with us.
1.Replication procedure
It would be helpful for us to analyze and provide you a solution at the earliest.
Regards,
Indumathi R