Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7e5c85e

Browse files
Allow removal of platform instance for testing purposes (#41)
* Revert "Merge pull request #35 from Baseflow/revert-34-enhancement/platform-interface" This reverts commit 101bf12, reversing changes made to d828355. * Adds method to remove platform instance
1 parent 92cd5c6 commit 7e5c85e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.1
2+
3+
* Adds `removeInstance` to `GoogleApiAvailabilityPlatform` for testing purposes.
4+
15
## 1.0.0
26

37
* Extracts the common platform interface from the google_api_availability package.

‎google_api_availability_platform_interface/lib/src/google_api_availability_platform_interface.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:flutter/foundation.dart';
12
import 'package:google_api_availability_platform_interface/google_api_availability_platform_interface.dart';
23
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
34

@@ -33,6 +34,13 @@ abstract class GoogleApiAvailabilityPlatform extends PlatformInterface {
3334
_instance = instance;
3435
}
3536

37+
/// Removes the registered instance of the [GoogleApiAvailabilityPlatform] class.
38+
///
39+
/// This method is exposed for testing purposes only and should not be used by
40+
/// clients of the plugin.
41+
@visibleForTesting
42+
static removeInstance() => _instance = null;
43+
3644
/// Returns the connection status of Google Play Service.
3745
///
3846
/// Optionally, you can also show an error dialog if the connection status is

‎google_api_availability_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: A common platform interface for the google_api_availability plugin.
33
repository: https://github.com/baseflow/flutter-google-api-availability/tree/main/google_api_availability_platform_interface
44
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
55
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
6-
version: 1.0.0
6+
version: 1.0.1
77

88
dependencies:
99
flutter:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /