Skip to content

Commit 95ad990

Browse files
committed
Updated code and made small improvements and changes
1 parent acd40d1 commit 95ad990

16 files changed

+65
-67
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 3.0.2
2+
3+
* Updated `pubspec.yaml` to newer versions of `SDK` and `flutter` and adding `flutter_lints` as a dependency;
4+
* Updated `analysis_options.yaml` for using `flutter_lints`;
5+
* Updated code according to the set lint rule(s);
6+
* Updated `compileSdkVersion` and `targetSdkVersion` in the `build.gradle`
7+
* Fixed bug were starting the example app would close on running for the first time by adding internet permission in the `AndroidManifest`
8+
19
## 3.0.1
210

311
* Added unit-tests to guard API against breaking changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To use this plugin, add `google_api_availability` as a [dependency in your pubsp
1414

1515
```yaml
1616
dependencies:
17-
google_api_availability: ^3.0.1
17+
google_api_availability: ^3.0.2
1818
```
1919
2020
> **NOTE:** There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue [Flutter#16049](https://github.com/flutter/flutter/issues/16049) for help on integration.

analysis_options.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
include: package:pedantic/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
22

33
analyzer:
44
exclude:
55
# Ignore generated files
66
- '**/*.g.dart'
77
- 'lib/src/generated/*.dart'
8-
# workaround for https://github.com/dart-lang/sdk/issues/42910
9-
- 'example/**'
108
linter:
119
rules:
1210
- public_member_api_docs

example/android/app/build.gradle

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

2727
android {
28-
compileSdkVersion 29
28+
compileSdkVersion 31
2929

3030
lintOptions {
3131
disable 'InvalidPackage'
@@ -35,7 +35,7 @@ android {
3535
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3636
applicationId "com.baseflow.googleapiavailabilityexample"
3737
minSdkVersion 16
38-
targetSdkVersion 29
38+
targetSdkVersion 31
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName
4141
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

example/android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
xmlns:tools="http://schemas.android.com/tools"
33
package="com.baseflow.googleapiavailabilityexample">
44

5+
<uses-permission android:name="android.permission.INTERNET" />
6+
57
<application
6-
android:name="io.flutter.app.FlutterApplication"
8+
android:name="${applicationName}"
79
android:icon="@mipmap/ic_launcher"
810
android:label="google_api_availability_example"
911
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
@@ -34,7 +36,6 @@
3436
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"
3537
android:hardwareAccelerated="true"
3638
android:windowSoftInputMode="adjustResize" />
37-
3839
<meta-data android:name="flutterEmbedding" android:value="2"/>
3940
</application>
4041
</manifest>

example/ios/Flutter/Flutter.podspec

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

example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:google_api_availability/google_api_availability.dart';
66

77
void main() => runApp(MyApp());
88

9+
///Creates the mutable state for this widget
910
class MyApp extends StatefulWidget {
1011
@override
1112
_MyAppState createState() => _MyAppState();

example/pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: characters
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "1.1.0"
10+
version: "1.2.0"
1111
collection:
1212
dependency: transitive
1313
description:
@@ -21,7 +21,7 @@ packages:
2121
name: cupertino_icons
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "0.1.2"
24+
version: "0.1.3"
2525
flutter:
2626
dependency: "direct main"
2727
description: flutter
@@ -33,14 +33,14 @@ packages:
3333
path: ".."
3434
relative: true
3535
source: path
36-
version: "3.0.0"
36+
version: "3.0.1"
3737
meta:
3838
dependency: transitive
3939
description:
4040
name: meta
4141
url: "https://pub.dartlang.org"
4242
source: hosted
43-
version: "1.3.0"
43+
version: "1.7.0"
4444
sky_engine:
4545
dependency: transitive
4646
description: flutter
@@ -59,7 +59,7 @@ packages:
5959
name: vector_math
6060
url: "https://pub.dartlang.org"
6161
source: hosted
62-
version: "2.1.0"
62+
version: "2.1.1"
6363
sdks:
64-
dart: ">=2.12.0-259.9.beta <3.0.0"
65-
flutter: ">=1.12.13+hotfix.6"
64+
dart: ">=2.15.0 <3.0.0"
65+
flutter: ">=2.8.1"

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Demonstrates how to use the google_api_availability plugin.
33
version: 1.0.0+1
44

55
environment:
6-
sdk: ">=2.10.0 <3.0.0"
6+
sdk: ">=2.15.0 <3.0.0"
77

88
dependencies:
99
flutter:

lib/src/google_api_availability.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import 'dart:async';
2-
32
import 'package:flutter/foundation.dart';
4-
import 'package:meta/meta.dart';
53
import 'package:flutter/services.dart';
64
import 'package:google_api_availability/src/models/google_play_services_availability.dart';
75

@@ -12,13 +10,14 @@ import 'models/google_play_services_availability.dart';
1210
class GoogleApiAvailability {
1311
const GoogleApiAvailability._();
1412

13+
///Only visible for testing purposes
1514
@visibleForTesting
1615
const GoogleApiAvailability.private();
1716

1817
/// Acquires an instance of the [GoogleApiAvailability] class.
1918
static const GoogleApiAvailability instance = GoogleApiAvailability._();
2019

21-
static final MethodChannel _methodChannel = const MethodChannel(
20+
static const MethodChannel _methodChannel = MethodChannel(
2221
'flutter.baseflow.com/google_api_availability/methods');
2322

2423
/// This feature is only available on Android devices. On any other platforms

0 commit comments

Comments
 (0)