Skip to content

Commit d0c7e74

Browse files
authored
Merge pull request #23 from Baseflow/develop
Stable null safety release
2 parents 4d6dd4d + 7cb813f commit d0c7e74

26 files changed

+202
-581
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: Baseflow
2+
custom: https://baseflow.com/contact
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: google_api_availability
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the develop branch
7+
on:
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# Job configuration for the google_api_availability (App Facing Package)
16+
google_api_availability:
17+
# The type of runner that the job will run on
18+
runs-on: macos-latest
19+
env:
20+
source-directory: ./
21+
example-directory: ./example
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
# Make sure the stable version of Flutter is available
29+
- uses: subosito/flutter-action@v1
30+
with:
31+
channel: 'beta'
32+
33+
# Download all Flutter packages the google_api_availability depends on
34+
- name: Download dependencies
35+
run: flutter pub get
36+
working-directory: ${{env.source-directory}}
37+
38+
# Run Flutter Format to ensure formatting is valid
39+
- name: Run Flutter Format
40+
run: flutter format --set-exit-if-changed lib
41+
working-directory: ${{env.source-directory}}
42+
43+
# Run Flutter Analyzer
44+
- name: Run Flutter Analyzer
45+
run: flutter analyze
46+
working-directory: ${{env.source-directory}}
47+
48+
# Build Android version of the example app
49+
- name: Run Android build
50+
run: flutter build apk --release
51+
working-directory: ${{env.example-directory}}
52+
53+
# Build iOS version of the example app
54+
- name: Run iOS build
55+
run: flutter build ios --release --no-codesign
56+
working-directory: ${{env.example-directory}}

.travis.yml

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.0
2+
3+
* Stable null safety release.
4+
15
## 2.0.4
26

37
* Android: Depend on GMS base instead of location;

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Flutter Google Api Availability Plugin
22

3-
[![pub package](https://img.shields.io/pub/v/google_api_availability.svg)](https://pub.dartlang.org/packages/google_api_availability)
3+
[![pub package](https://img.shields.io/pub/v/google_api_availability.svg)](https://pub.dartlang.org/packages/google_api_availability) ![Build status](https://github.com/Baseflow/flutter-google-api-availability/workflows/google_api_availability/badge.svg?branch=master)
44

55
A Flutter plugin to check the availability of Google Play services on the current device.
66

7-
Branch | Build Status
8-
------- | ------------
9-
develop | [![Build Status](https://travis-ci.com/BaseflowIT/flutter-google-api-availability.svg?branch=develop)](https://travis-ci.com/BaseflowIT/flutter-google-api-availability)
10-
master | [![Build Status](https://travis-ci.com/BaseflowIT/flutter-google-api-availability.svg?branch=master)](https://travis-ci.com/BaseflowIT/flutter-google-api-availability)
11-
127
## Features
138

149
* Check the availability of Google Play services (on Android only).
@@ -19,7 +14,7 @@ To use this plugin, add `google_api_availability` as a [dependency in your pubsp
1914

2015
```yaml
2116
dependencies:
22-
google_api_availability: ^2.0.4
17+
google_api_availability: ^3.0.0
2318
```
2419
2520
> **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.
@@ -33,18 +28,18 @@ To check the availability of Google Play services on the current device, you can
3328
``` dart
3429
import `package:google_api_availability/google_api_availability.dart`;
3530

36-
GooglePlayServicesAvailability availability = await GoogleApiAvailability().checkGooglePlayServicesAvailability();
31+
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
3732
```
3833

3934
If you want to show a dialog by the Android system with more information and show a possible fix to the user you can do:
4035

4136
``` dart
4237
import `package:google_api_availability/google_api_availability.dart`;
4338
44-
GooglePlayServicesAvailability availability = await GoogleApiAvailability().checkGooglePlayServicesAvailability(true);
39+
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability(true);
4540
```
4641

47-
**Note that on iOS this will always return false!**
42+
**Note that on iOS this will always return `notAvailableOnPlatform`!**
4843

4944
See also the [example](example/lib/main.dart) project for a complete implementation.
5045

analysis_options.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
include: package:pedantic/analysis_options.1.8.0.yaml
1+
include: package:pedantic/analysis_options.yaml
2+
23
analyzer:
34
exclude:
45
# Ignore generated files
56
- '**/*.g.dart'
67
- 'lib/src/generated/*.dart'
8+
# workaround for https://github.com/dart-lang/sdk/issues/42910
9+
- 'example/**'
710
linter:
811
rules:
912
- public_member_api_docs

example/android/app/src/androidTest/java/com/baseflow/googleapiavailability/EmbeddingV1ActivityTest.java

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

example/android/app/src/androidTest/java/com/baseflow/googleapiavailability/MainActivityTest.java

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

example/android/app/src/main/java/com/baseflow/googleapiavailabilityexample/EmbeddingV1Activity.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.os.Bundle;
44
import com.baseflow.googleapiavailability.GoogleApiAvailabilityPlugin;
5-
import dev.flutter.plugins.e2e.E2EPlugin;
65
import io.flutter.app.FlutterActivity;
76

87
public class EmbeddingV1Activity extends FlutterActivity {
@@ -13,6 +12,5 @@ protected void onCreate(Bundle savedInstanceState) {
1312
GoogleApiAvailabilityPlugin
1413
.registerWith(
1514
registrarFor("com.baseflow.googleapiavailability.GoogleApiAvailabilityPlugin"));
16-
E2EPlugin.registerWith(registrarFor("dev.flutter.plugins.e2e.E2EPlugin"));
1715
}
1816
}

example/ios/Flutter/Debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
23
#include "Generated.xcconfig"
34

0 commit comments

Comments
 (0)