Skip to content

Commit 4a00c5b

Browse files
committed
sdk 0.3.4 :
* Updated sdk minimum to 2.15.0 * Updating web to 0.1.4 * Updating android to 0.1.5 * Updating windows to 0.1.2 * Updating linux to 0.1.2 * Updating macos to 0.1.2
1 parent 550fb28 commit 4a00c5b

File tree

14 files changed

+60
-42
lines changed

14 files changed

+60
-42
lines changed

flutter_google_places_sdk/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.3.4
2+
3+
* Updated sdk minimum to 2.15.0
4+
* Updating web to 0.1.4
5+
* Updating android to 0.1.5
6+
* Updating windows to 0.1.2
7+
* Updating linux to 0.1.2
8+
* Updating macos to 0.1.2
9+
110
## 0.3.3
211

312
* Updated sdk minimum to 2.14.0

flutter_google_places_sdk/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 31
29+
compileSdkVersion 33
3030
ndkVersion "21.4.7075529"
3131

3232
sourceSets {
@@ -39,7 +39,7 @@ android {
3939

4040
defaultConfig {
4141
applicationId "com.msh.flutter_google_places_sdk_example"
42-
minSdkVersion 16
42+
minSdkVersion 21
4343
targetSdkVersion 28
4444
versionCode flutterVersionCode.toInteger()
4545
versionName flutterVersionName

flutter_google_places_sdk/example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.21'
2+
ext.kotlin_version = '1.8.22'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:7.4.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

flutter_google_places_sdk/example/lib/google_places_img.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class GooglePlacesImg extends StatelessWidget {
1616

1717
@override
1818
Widget build(BuildContext context) {
19-
return placePhotoResponse.image!;
19+
return placePhotoResponse.maybeWhen(
20+
image: (image) => image,
21+
orElse: () => Text('Invalid image'),
22+
);
2023
}
2124
}

flutter_google_places_sdk/example/lib/google_places_img_web.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ class GooglePlacesImg extends StatelessWidget {
1919

2020
@override
2121
Widget build(BuildContext context) {
22-
final imageUrl = placePhotoResponse.imageUrl!;
22+
final imageUrl =
23+
placePhotoResponse.whenOrNull(imageUrl: (imageUrl) => imageUrl);
24+
if (imageUrl == null) {
25+
return Text('Invalid image url!');
26+
}
2327

2428
// ignore: undefined_prefixed_name
2529
ui.platformViewRegistry.registerViewFactory(photoMetadata.photoReference,

flutter_google_places_sdk/example/lib/main.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class _MyHomePageState extends State<MyHomePage> {
4242
//
4343
String? _predictLastText;
4444

45-
PlaceTypeFilter _placeTypeFilter = PlaceTypeFilter.ESTABLISHMENT;
45+
List<PlaceTypeFilter> _placeTypesFilter = [PlaceTypeFilter.ESTABLISHMENT];
4646

4747
bool _locationBiasEnabled = true;
4848
LatLngBounds _locationBias = LatLngBounds(
@@ -137,7 +137,7 @@ class _MyHomePageState extends State<MyHomePage> {
137137
void _onPlaceTypeFilterChanged(PlaceTypeFilter? value) {
138138
if (value != null) {
139139
setState(() {
140-
_placeTypeFilter = value;
140+
_placeTypesFilter = [value];
141141
});
142142
}
143143
}
@@ -226,7 +226,7 @@ class _MyHomePageState extends State<MyHomePage> {
226226
final result = await _places.findAutocompletePredictions(
227227
_predictLastText!,
228228
countries: _countriesEnabled ? _countries : null,
229-
placeTypeFilter: _placeTypeFilter,
229+
placeTypesFilter: _placeTypesFilter,
230230
newSessionToken: false,
231231
origin: LatLng(lat: 43.12, lng: 95.20),
232232
locationBias: _locationBiasEnabled ? _locationBias : null,
@@ -379,7 +379,7 @@ class _MyHomePageState extends State<MyHomePage> {
379379
.map((item) => DropdownMenuItem<PlaceTypeFilter>(
380380
child: Text(item.value), value: item))
381381
.toList(growable: false),
382-
value: _placeTypeFilter,
382+
value: _placeTypesFilter.isEmpty ? null : _placeTypesFilter[0],
383383
onChanged: _onPlaceTypeFilterChanged,
384384
),
385385
// -- Location Bias

flutter_google_places_sdk/example/pubspec.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ description: Demonstrates how to use the flutter_google_places_sdk plugin.
44
publish_to: 'none'
55

66
environment:
7-
sdk: ">=2.12.0 <3.0.0"
7+
sdk: ">=2.14.0 <4.0.0"
88

99
dependencies:
1010
flutter:
1111
sdk: flutter
1212
flutter_google_places_sdk:
13-
path: ../
13+
path: ../../flutter_google_places_sdk
1414

1515
dev_dependencies:
16-
integration_test:
17-
sdk: flutter
1816
flutter_test:
1917
sdk: flutter
2018

flutter_google_places_sdk/example/test_driver/integration_test.dart

Lines changed: 0 additions & 3 deletions
This file was deleted.

flutter_google_places_sdk/example/windows/runner/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ add_executable(${BINARY_NAME} WIN32
2020
# that need different build settings.
2121
apply_standard_settings(${BINARY_NAME})
2222

23+
# Add preprocessor definitions for the build version.
24+
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25+
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26+
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27+
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28+
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29+
2330
# Disable Windows macros that collide with C++ standard library functions.
2431
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
2532

0 commit comments

Comments
 (0)