-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add methods and classes for Places (New) API in `flutter_google_place…
…s_sdk_platform_interface` (#87) * Add methods and classes for Places (New) API * Add tests for native calls * Implement PR feedback * add missing return in test --------- Signed-off-by: Matan Shukry <[email protected]> Co-authored-by: Matan Shukry <[email protected]>
- Loading branch information
1 parent
ab7e4a3
commit 67dfb02
Showing
16 changed files
with
548 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'author_attribution.freezed.dart'; | ||
part 'author_attribution.g.dart'; | ||
|
||
@Freezed() | ||
class AuthorAttribution with _$AuthorAttribution { | ||
/// Constructs a [AuthorAttribution] object. | ||
const factory AuthorAttribution({ | ||
/// The name of the author. | ||
required String name, | ||
|
||
/// The profile photo URI of the author. | ||
required String photoUri, | ||
|
||
/// The URI of the author. | ||
required String uri, | ||
}) = _AuthorAttribution; | ||
|
||
/// Parse an [AuthorAttribution] from json. | ||
factory AuthorAttribution.fromJson(Map<String, Object?> json) => | ||
_$AuthorAttributionFromJson(json); | ||
} |
19 changes: 19 additions & 0 deletions
19
flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'package:flutter_google_places_sdk_platform_interface/src/types/lat_lng.dart'; | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'circular_bounds.freezed.dart'; | ||
part 'circular_bounds.g.dart'; | ||
|
||
/// An immutable class representing a latitude/longitude aligned circle, with a defined radius. | ||
@Freezed() | ||
class CircularBounds with _$CircularBounds { | ||
/// constructs a [CircularBounds] object. | ||
const factory CircularBounds({ | ||
required LatLng center, | ||
required double radius, | ||
}) = _CircularBounds; | ||
|
||
/// Parse an [CircularBounds] from json. | ||
factory CircularBounds.fromJson(Map<String, Object?> json) => | ||
_$CircularBoundsFromJson(json); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.