-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled exception: type 'Null' is not a subtype of type 'String' in type cast #35
Comments
Is it possible to create a small reproducible project. |
I remember that It works ok on my project with Flutter 2.x. Now when I trying again, it appears this error, but now I'd migrated to Flutter 3.0.5. I don't known if is a problem with a Flutter version. |
Hmm we are using flutter 3.x on all our projects without issues. It is linked to a package that can not be fully parsed. Can you share your pubspec & pubspec.lock? |
` environment: dependencies: dev_dependencies: license_generator: flutter_gen: flutter_native_splash: flutter_icons: flutter: ` |
Unable to reproduce so far. @dumabg Can you confirm that both private repositories are property setup with a version and LICENSE ? What OS are you using? Please provide us with a minimum public accessible example to continue investigating this issue. |
I'm having the same issue, here is a example to reproduce the error: https://github.com/mgwrd/license_generator_error |
Unhandled exception:
type 'Null' is not a subtype of type 'String' in type cast
#0 new CachedPackage.fromJson (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/model/dto/config/cached_package.dart:26:38)
#1 new PackageConfig.fromJson. (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/model/dto/config/package_config.dart:16:45)
#2 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31)
#3 ListIterator.moveNext (dart:_internal/iterable.dart:342:26)
#4 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#5 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#6 new List.of (dart:core-patch/array_patch.dart:51:28)
#7 ListIterable.toList (dart:_internal/iterable.dart:213:44)
#8 new PackageConfig.fromJson (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/model/dto/config/package_config.dart:17:12)
#9 ConfigService.getConfigData (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/service/config_service.dart:31:41)
#10 LicenseRepository.getLicenseDataForDependency (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/repo/license_repository.dart:58:32)
#11 GenerateCommand._getDependencyText (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/command/generate_command.dart:101:25)
#12 GenerateCommand.generateLicenses (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/command/generate_command.dart:87:13)
#13 LicenseGenerator.run (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/src/license_generator.dart:84:9)
#14 main (file:///home/xxx/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/license_generator-1.0.3/bin/license_generator.dart:10:5)
pub finished with exit code 255
The text was updated successfully, but these errors were encountered: