Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.5

* Remove dart:io Platform checks from the MethodChannel implementation. This is
tripping the analysis of other versions of the plugin.

## 1.0.4

* Bump the minimum Flutter version to 1.12.13+hotfix.5.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// found in the LICENSE file.

import 'dart:async';
import 'dart:io' show Platform;

import 'package:connectivity_platform_interface/connectivity_platform_interface.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -68,9 +67,6 @@ class MethodChannelConnectivity extends ConnectivityPlatform {
Future<LocationAuthorizationStatus> requestLocationServiceAuthorization({
bool requestAlwaysLocationUsage = false,
}) {
// `assert(Platform.isIOS)` will prevent us from doing dart side unit testing.
// TODO: These should noop for non-Android, instead of throwing, so people don't need to rely on dart:io for this.
assert(!Platform.isAndroid);
return methodChannel.invokeMethod<String>(
'requestLocationServiceAuthorization', <bool>[
requestAlwaysLocationUsage
Expand All @@ -79,8 +75,6 @@ class MethodChannelConnectivity extends ConnectivityPlatform {

@override
Future<LocationAuthorizationStatus> getLocationServiceAuthorization() {
// `assert(Platform.isIOS)` will prevent us from doing dart side unit testing.
assert(!Platform.isAndroid);
return methodChannel
.invokeMethod<String>('getLocationServiceAuthorization')
.then(parseLocationAuthorizationStatus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the connectivity plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 1.0.4
version: 1.0.5

dependencies:
flutter:
Expand Down