dart-google-maps
dart-google-maps copied to clipboard
StructuredFormatting._secondaryText has non-nullable-type, but actual value can be null
I am playing around with the google maps and as part of the search I have received an error, since I tried to use the secondaryText getter.
DartError: TypeError: null: type 'Null' is not a subtype of type 'String'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3 throw_
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1717:3 _asString
dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 82:5 getProperty
package:google_maps/src/generated/places_autocomplete_service/structured_formatting.dart 35:31 StructuredFormatting.get$35secondaryText
Line 35 is: String get secondaryText => _secondaryText;
This was received as a response from the AutocompleteService.getPlacePredictions method.
An example where documentation lies about nullability as it's not marked optional 🫤
An example where documentation lies about nullability as it's not marked optional 🫤
To be fair though, I don't think the documentation is null-safety xd
That is, they didn't say it was required either.