Skip to content
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

T? for result #142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: vporton # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
6 changes: 3 additions & 3 deletions example/places_autocomplete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Future<void> main() async {
);

print('\nDetails :');
print(details.result.formattedAddress);
print(details.result.formattedPhoneNumber);
print(details.result.url);
print(details.result!.formattedAddress);
print(details.result!.formattedPhoneNumber);
print(details.result!.url);
} else {
print(res.errorMessage);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ abstract class GoogleResponseList<T> extends GoogleResponseStatus {
}

abstract class GoogleResponse<T> extends GoogleResponseStatus {
final T result;
final T? result;

GoogleResponse(String status, String? errorMessage, this.result)
: super(status: status, errorMessage: errorMessage);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/places.dart
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ enum PriceLevel {

@JsonSerializable()
class PlacesDetailsResponse extends GoogleResponseStatus {
final PlaceDetails result;
final PlaceDetails? result;

/// JSON html_attributions
@JsonKey(defaultValue: <String>[])
Expand Down
2 changes: 1 addition & 1 deletion lib/src/places.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.