diff --git a/packages/connectivity_plus/connectivity_plus/example/integration_test/connectivity_plus_test.dart b/packages/connectivity_plus/connectivity_plus/example/integration_test/connectivity_plus_test.dart index b0c7c9ba4b..406c323764 100644 --- a/packages/connectivity_plus/connectivity_plus/example/integration_test/connectivity_plus_test.dart +++ b/packages/connectivity_plus/connectivity_plus/example/integration_test/connectivity_plus_test.dart @@ -14,34 +14,34 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('Connectivity test driver', () { - Connectivity _connectivity; + Connectivity connectivity; setUpAll(() async { - _connectivity = Connectivity(); + connectivity = Connectivity(); }); testWidgets('test connectivity result', (WidgetTester tester) async { - final result = await _connectivity.checkConnectivity(); + final result = await connectivity.checkConnectivity(); expect(result, isNotNull); }); testWidgets('connectivity on Android emulator should be wifi', (WidgetTester tester) async { - final result = await _connectivity.checkConnectivity(); + final result = await connectivity.checkConnectivity(); expect(result, ConnectivityResult.wifi); }, skip: !Platform.isAndroid); testWidgets('connectivity on MacOS should be ethernet', (WidgetTester tester) async { - final result = await _connectivity.checkConnectivity(); + final result = await connectivity.checkConnectivity(); expect(result, ConnectivityResult.ethernet); }, skip: !Platform.isMacOS); testWidgets('connectivity on Linux should be none', (WidgetTester tester) async { - final result = await _connectivity.checkConnectivity(); + final result = await connectivity.checkConnectivity(); expect(result, ConnectivityResult.none); }, skip: !Platform.isLinux); diff --git a/packages/connectivity_plus/connectivity_plus/example/lib/main.dart b/packages/connectivity_plus/connectivity_plus/example/lib/main.dart index 99eae054e7..7ecc81db6a 100644 --- a/packages/connectivity_plus/connectivity_plus/example/lib/main.dart +++ b/packages/connectivity_plus/connectivity_plus/example/lib/main.dart @@ -37,7 +37,7 @@ class MyHomePage extends StatefulWidget { final String title; @override - _MyHomePageState createState() => _MyHomePageState(); + State createState() => _MyHomePageState(); } class _MyHomePageState extends State { diff --git a/packages/connectivity_plus/connectivity_plus/example/pubspec.yaml b/packages/connectivity_plus/connectivity_plus/example/pubspec.yaml index df6e377a3e..3a4fd0da04 100644 --- a/packages/connectivity_plus/connectivity_plus/example/pubspec.yaml +++ b/packages/connectivity_plus/connectivity_plus/example/pubspec.yaml @@ -11,16 +11,8 @@ dependencies: path: ../ dependency_overrides: - connectivity_plus_linux: - path: ../../connectivity_plus_linux - connectivity_plus_macos: - path: ../../connectivity_plus_macos connectivity_plus_platform_interface: path: ../../connectivity_plus_platform_interface - connectivity_plus_web: - path: ../../connectivity_plus_web - connectivity_plus_windows: - path: ../../connectivity_plus_windows dev_dependencies: flutter_driver: diff --git a/packages/connectivity_plus/connectivity_plus/lib/connectivity_plus.dart b/packages/connectivity_plus/connectivity_plus/lib/connectivity_plus.dart index 7e2ba98778..dfba08c3dc 100644 --- a/packages/connectivity_plus/connectivity_plus/lib/connectivity_plus.dart +++ b/packages/connectivity_plus/connectivity_plus/lib/connectivity_plus.dart @@ -10,6 +10,8 @@ import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_ export 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart' show ConnectivityResult; +export 'src/connectivity_plus_linux.dart'; + /// Discover network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more. class Connectivity { /// Constructs a singleton instance of [Connectivity]. diff --git a/packages/connectivity_plus/connectivity_plus_linux/lib/src/connectivity.dart b/packages/connectivity_plus/connectivity_plus/lib/src/connectivity_plus_linux.dart similarity index 95% rename from packages/connectivity_plus/connectivity_plus_linux/lib/src/connectivity.dart rename to packages/connectivity_plus/connectivity_plus/lib/src/connectivity_plus_linux.dart index 9536e4dad5..42544a021b 100644 --- a/packages/connectivity_plus/connectivity_plus_linux/lib/src/connectivity.dart +++ b/packages/connectivity_plus/connectivity_plus/lib/src/connectivity_plus_linux.dart @@ -11,10 +11,10 @@ import 'package:nm/nm.dart'; typedef NetworkManagerClientFactory = NetworkManagerClient Function(); /// The Linux implementation of ConnectivityPlatform. -class ConnectivityLinux extends ConnectivityPlatform { +class ConnectivityPlusLinuxPlugin extends ConnectivityPlatform { /// Register this dart class as the platform implementation for linux static void registerWith() { - ConnectivityPlatform.instance = ConnectivityLinux(); + ConnectivityPlatform.instance = ConnectivityPlusLinuxPlugin(); } /// Checks the connection status of the device. diff --git a/packages/connectivity_plus/connectivity_plus_web/lib/connectivity_plus_web.dart b/packages/connectivity_plus/connectivity_plus/lib/src/connectivity_plus_web.dart similarity index 86% rename from packages/connectivity_plus/connectivity_plus_web/lib/connectivity_plus_web.dart rename to packages/connectivity_plus/connectivity_plus/lib/src/connectivity_plus_web.dart index 4f99dbab16..28c1db1d03 100644 --- a/packages/connectivity_plus/connectivity_plus_web/lib/connectivity_plus_web.dart +++ b/packages/connectivity_plus/connectivity_plus/lib/src/connectivity_plus_web.dart @@ -1,11 +1,11 @@ import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart'; import 'package:flutter_web_plugins/flutter_web_plugins.dart'; -import 'src/network_information_api_connectivity_plugin.dart'; -import 'src/dart_html_connectivity_plugin.dart'; +import 'web/network_information_api_connectivity_plugin.dart'; +import 'web/dart_html_connectivity_plugin.dart'; /// The web implementation of the ConnectivityPlatform of the Connectivity plugin. -class ConnectivityPlusPlugin extends ConnectivityPlatform { +class ConnectivityPlusWebPlugin extends ConnectivityPlatform { /// Factory method that initializes the connectivity plugin platform with an instance /// of the plugin for the web. static void registerWith(Registrar registrar) { diff --git a/packages/connectivity_plus/connectivity_plus_web/lib/src/dart_html_connectivity_plugin.dart b/packages/connectivity_plus/connectivity_plus/lib/src/web/dart_html_connectivity_plugin.dart similarity index 89% rename from packages/connectivity_plus/connectivity_plus_web/lib/src/dart_html_connectivity_plugin.dart rename to packages/connectivity_plus/connectivity_plus/lib/src/web/dart_html_connectivity_plugin.dart index 76d8062de2..d5c0c68bf8 100644 --- a/packages/connectivity_plus/connectivity_plus_web/lib/src/dart_html_connectivity_plugin.dart +++ b/packages/connectivity_plus/connectivity_plus/lib/src/web/dart_html_connectivity_plugin.dart @@ -2,10 +2,11 @@ import 'dart:async'; import 'dart:html' as html show window; import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart'; -import 'package:connectivity_plus_web/connectivity_plus_web.dart'; + +import '../connectivity_plus_web.dart'; /// The web implementation of the ConnectivityPlatform of the Connectivity plugin. -class DartHtmlConnectivityPlugin extends ConnectivityPlusPlugin { +class DartHtmlConnectivityPlugin extends ConnectivityPlusWebPlugin { /// Checks the connection status of the device. @override Future checkConnectivity() async { diff --git a/packages/connectivity_plus/connectivity_plus_web/lib/src/network_information_api_connectivity_plugin.dart b/packages/connectivity_plus/connectivity_plus/lib/src/web/network_information_api_connectivity_plugin.dart similarity index 94% rename from packages/connectivity_plus/connectivity_plus_web/lib/src/network_information_api_connectivity_plugin.dart rename to packages/connectivity_plus/connectivity_plus/lib/src/web/network_information_api_connectivity_plugin.dart index 98064ae05b..bc822a76a6 100644 --- a/packages/connectivity_plus/connectivity_plus_web/lib/src/network_information_api_connectivity_plugin.dart +++ b/packages/connectivity_plus/connectivity_plus/lib/src/web/network_information_api_connectivity_plugin.dart @@ -2,15 +2,16 @@ import 'dart:async'; import 'dart:html' as html show window, NetworkInformation; import 'dart:js_util'; +import 'package:connectivity_plus/src/web/utils/connectivity_result.dart'; import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart'; -import 'package:connectivity_plus_web/connectivity_plus_web.dart'; import 'package:flutter/foundation.dart'; import 'package:js/js.dart'; -import 'utils/connectivity_result.dart'; +import '../connectivity_plus_web.dart'; /// The web implementation of the ConnectivityPlatform of the Connectivity plugin. -class NetworkInformationApiConnectivityPlugin extends ConnectivityPlusPlugin { +class NetworkInformationApiConnectivityPlugin + extends ConnectivityPlusWebPlugin { final html.NetworkInformation _networkInformation; /// A check to determine if this version of the plugin can be used. diff --git a/packages/connectivity_plus/connectivity_plus_web/lib/src/utils/connectivity_result.dart b/packages/connectivity_plus/connectivity_plus/lib/src/web/utils/connectivity_result.dart similarity index 100% rename from packages/connectivity_plus/connectivity_plus_web/lib/src/utils/connectivity_result.dart rename to packages/connectivity_plus/connectivity_plus/lib/src/web/utils/connectivity_result.dart diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityPlugin.swift b/packages/connectivity_plus/connectivity_plus/macos/Classes/ConnectivityPlugin.swift similarity index 100% rename from packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityPlugin.swift rename to packages/connectivity_plus/connectivity_plus/macos/Classes/ConnectivityPlugin.swift diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityProvider.swift b/packages/connectivity_plus/connectivity_plus/macos/Classes/ConnectivityProvider.swift similarity index 100% rename from packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ConnectivityProvider.swift rename to packages/connectivity_plus/connectivity_plus/macos/Classes/ConnectivityProvider.swift diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/PathMonitorConnectivityProvider.swift b/packages/connectivity_plus/connectivity_plus/macos/Classes/PathMonitorConnectivityProvider.swift similarity index 100% rename from packages/connectivity_plus/connectivity_plus_macos/macos/Classes/PathMonitorConnectivityProvider.swift rename to packages/connectivity_plus/connectivity_plus/macos/Classes/PathMonitorConnectivityProvider.swift diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ReachabilityConnectivityProvider.swift b/packages/connectivity_plus/connectivity_plus/macos/Classes/ReachabilityConnectivityProvider.swift similarity index 100% rename from packages/connectivity_plus/connectivity_plus_macos/macos/Classes/ReachabilityConnectivityProvider.swift rename to packages/connectivity_plus/connectivity_plus/macos/Classes/ReachabilityConnectivityProvider.swift diff --git a/packages/connectivity_plus/connectivity_plus/macos/connectivity_plus.podspec b/packages/connectivity_plus/connectivity_plus/macos/connectivity_plus.podspec index 378a5374b5..4d155d2ca3 100644 --- a/packages/connectivity_plus/connectivity_plus/macos/connectivity_plus.podspec +++ b/packages/connectivity_plus/connectivity_plus/macos/connectivity_plus.podspec @@ -4,19 +4,18 @@ Pod::Spec.new do |s| s.name = 'connectivity_plus' s.version = '0.0.1' - s.summary = 'No-op implementation of the macos connectivity to avoid build issues on macos' + s.summary = 'Flutter plugin for checking connectivity' s.description = <<-DESC - No-op implementation of the connectivity plugin to avoid build issues on macos. - https://github.com/flutter/flutter/issues/46618 + Desktop implementation of the connectivity plugin DESC s.homepage = 'https://plus.fluttercommunity.dev/' s.license = { :type => 'BSD', :file => '../LICENSE' } s.author = { 'Flutter Community Team' => 'authors@fluttercommunity.dev' } s.source = { :http => 'https://github.com/fluttercommunity/plus_plugins' } s.documentation_url = 'https://pub.dev/packages/connectivity_plus' - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' + s.source_files = 'Classes/**/*' + s.dependency 'FlutterMacOS' + s.dependency 'ReachabilitySwift' s.platform = :osx s.osx.deployment_target = '10.11' diff --git a/packages/connectivity_plus/connectivity_plus/pubspec.yaml b/packages/connectivity_plus/connectivity_plus/pubspec.yaml index e98d3ea223..ea033f3f15 100644 --- a/packages/connectivity_plus/connectivity_plus/pubspec.yaml +++ b/packages/connectivity_plus/connectivity_plus/pubspec.yaml @@ -18,27 +18,31 @@ flutter: ios: pluginClass: ConnectivityPlusPlugin linux: - default_package: connectivity_plus_linux + dartPluginClass: ConnectivityPlusLinuxPlugin macos: - default_package: connectivity_plus_macos + pluginClass: ConnectivityPlugin web: - default_package: connectivity_plus_web + pluginClass: ConnectivityPlusWebPlugin + fileName: src/connectivity_plus_web.dart windows: - default_package: connectivity_plus_windows + pluginClass: ConnectivityPlusWindowsPlugin dependencies: flutter: sdk: flutter - connectivity_plus_platform_interface: ^1.2.0 - connectivity_plus_linux: ^1.3.0 - connectivity_plus_macos: ^1.2.4 - connectivity_plus_web: ^1.2.5 - connectivity_plus_windows: ^1.2.2 + flutter_web_plugins: + sdk: flutter + connectivity_plus_platform_interface: ^1.2.1 + js: ^0.6.3 + meta: ^1.8.0 + nm: ^0.5.0 dev_dependencies: flutter_test: sdk: flutter - test: ^1.21.1 + build_runner: ^2.1.11 + dbus: ^0.7.5 + flutter_lints: ^2.0.1 mockito: ^5.2.0 plugin_platform_interface: ^2.1.2 - flutter_lints: ^2.0.1 + test: ^1.21.1 diff --git a/packages/connectivity_plus/connectivity_plus_linux/test/connectivity_plus_linux_test.dart b/packages/connectivity_plus/connectivity_plus/test/connectivity_plus_linux_test.dart similarity index 85% rename from packages/connectivity_plus/connectivity_plus_linux/test/connectivity_plus_linux_test.dart rename to packages/connectivity_plus/connectivity_plus/test/connectivity_plus_linux_test.dart index 37db45fe04..ecdbc7391f 100644 --- a/packages/connectivity_plus/connectivity_plus_linux/test/connectivity_plus_linux_test.dart +++ b/packages/connectivity_plus/connectivity_plus/test/connectivity_plus_linux_test.dart @@ -1,4 +1,4 @@ -import 'package:connectivity_plus_linux/src/connectivity.dart'; +import 'package:connectivity_plus/src/connectivity_plus_linux.dart'; import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/annotations.dart'; @@ -10,12 +10,12 @@ import 'connectivity_plus_linux_test.mocks.dart'; @GenerateMocks([NetworkManagerClient]) void main() { test('registered instance', () { - ConnectivityLinux.registerWith(); - expect(ConnectivityPlatform.instance, isA()); + ConnectivityPlusLinuxPlugin.registerWith(); + expect(ConnectivityPlatform.instance, isA()); }); test('bluetooth', () async { - final linux = ConnectivityLinux(); + final linux = ConnectivityPlusLinuxPlugin(); linux.createClient = () { final client = MockNetworkManagerClient(); when(client.connectivity) @@ -30,7 +30,7 @@ void main() { }); test('ethernet', () async { - final linux = ConnectivityLinux(); + final linux = ConnectivityPlusLinuxPlugin(); linux.createClient = () { final client = MockNetworkManagerClient(); when(client.connectivity) @@ -45,7 +45,7 @@ void main() { }); test('wireless', () async { - final linux = ConnectivityLinux(); + final linux = ConnectivityPlusLinuxPlugin(); linux.createClient = () { final client = MockNetworkManagerClient(); when(client.connectivity) @@ -60,7 +60,7 @@ void main() { }); test('vpn', () async { - final linux = ConnectivityLinux(); + final linux = ConnectivityPlusLinuxPlugin(); linux.createClient = () { final client = MockNetworkManagerClient(); when(client.connectivity) @@ -75,7 +75,7 @@ void main() { }); test('no connectivity', () async { - final linux = ConnectivityLinux(); + final linux = ConnectivityPlusLinuxPlugin(); linux.createClient = () { final client = MockNetworkManagerClient(); when(client.connectivity) @@ -87,7 +87,7 @@ void main() { }); test('connectivity changes', () { - final linux = ConnectivityLinux(); + final linux = ConnectivityPlusLinuxPlugin(); linux.createClient = () { final client = MockNetworkManagerClient(); when(client.connectivity) diff --git a/packages/connectivity_plus/connectivity_plus_linux/test/connectivity_plus_linux_test.mocks.dart b/packages/connectivity_plus/connectivity_plus/test/connectivity_plus_linux_test.mocks.dart similarity index 100% rename from packages/connectivity_plus/connectivity_plus_linux/test/connectivity_plus_linux_test.mocks.dart rename to packages/connectivity_plus/connectivity_plus/test/connectivity_plus_linux_test.mocks.dart diff --git a/packages/connectivity_plus/connectivity_plus_windows/windows/.gitignore b/packages/connectivity_plus/connectivity_plus/windows/.gitignore similarity index 100% rename from packages/connectivity_plus/connectivity_plus_windows/windows/.gitignore rename to packages/connectivity_plus/connectivity_plus/windows/.gitignore diff --git a/packages/connectivity_plus/connectivity_plus_windows/windows/CMakeLists.txt b/packages/connectivity_plus/connectivity_plus/windows/CMakeLists.txt similarity index 78% rename from packages/connectivity_plus/connectivity_plus_windows/windows/CMakeLists.txt rename to packages/connectivity_plus/connectivity_plus/windows/CMakeLists.txt index 7ee88e4f4c..ac315ccdc9 100644 --- a/packages/connectivity_plus/connectivity_plus_windows/windows/CMakeLists.txt +++ b/packages/connectivity_plus/connectivity_plus/windows/CMakeLists.txt @@ -1,13 +1,13 @@ cmake_minimum_required(VERSION 3.15) -set(PROJECT_NAME "connectivity_plus_windows") +set(PROJECT_NAME "connectivity_plus") project(${PROJECT_NAME} LANGUAGES CXX) # This value is used when generating builds using this plugin, so it must # not be changed -set(PLUGIN_NAME "connectivity_plus_windows_plugin") +set(PLUGIN_NAME "connectivity_plus_plugin") add_library(${PLUGIN_NAME} SHARED - "connectivity_plus_windows_plugin.cpp" + "connectivity_plus_plugin.cpp" "network_manager.cpp" ) apply_standard_settings(${PLUGIN_NAME}) @@ -23,8 +23,7 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE ) # List of absolute paths to libraries that should be bundled with the plugin -set(connectivity_plus_windows_bundled_libraries +set(connectivity_plus_bundled_libraries "" PARENT_SCOPE ) - \ No newline at end of file diff --git a/packages/connectivity_plus/connectivity_plus_windows/windows/connectivity_plus_windows_plugin.cpp b/packages/connectivity_plus/connectivity_plus/windows/connectivity_plus_plugin.cpp similarity index 97% rename from packages/connectivity_plus/connectivity_plus_windows/windows/connectivity_plus_windows_plugin.cpp rename to packages/connectivity_plus/connectivity_plus/windows/connectivity_plus_plugin.cpp index 3b5d973b06..40742035ec 100644 --- a/packages/connectivity_plus/connectivity_plus_windows/windows/connectivity_plus_windows_plugin.cpp +++ b/packages/connectivity_plus/connectivity_plus/windows/connectivity_plus_plugin.cpp @@ -1,7 +1,7 @@ // clang-format off -#include "include/connectivity_plus_windows/network_manager.h" +#include "include/connectivity_plus/network_manager.h" // clang-format on -#include "include/connectivity_plus_windows/connectivity_plus_windows_plugin.h" +#include "include/connectivity_plus/connectivity_plus_windows_plugin.h" #include #include diff --git a/packages/connectivity_plus/connectivity_plus_windows/windows/include/connectivity_plus_windows/connectivity_plus_windows_plugin.h b/packages/connectivity_plus/connectivity_plus/windows/include/connectivity_plus/connectivity_plus_windows_plugin.h similarity index 79% rename from packages/connectivity_plus/connectivity_plus_windows/windows/include/connectivity_plus_windows/connectivity_plus_windows_plugin.h rename to packages/connectivity_plus/connectivity_plus/windows/include/connectivity_plus/connectivity_plus_windows_plugin.h index 9c6cdc778a..17af447443 100644 --- a/packages/connectivity_plus/connectivity_plus_windows/windows/include/connectivity_plus_windows/connectivity_plus_windows_plugin.h +++ b/packages/connectivity_plus/connectivity_plus/windows/include/connectivity_plus/connectivity_plus_windows_plugin.h @@ -1,5 +1,5 @@ -#ifndef FLUTTER_PLUGIN_CONNECTIVITY_PLUS_WINDOWS_PLUGIN_H_ -#define FLUTTER_PLUGIN_CONNECTIVITY_PLUS_WINDOWS_PLUGIN_H_ +#ifndef FLUTTER_PLUGIN_CONNECTIVITY_WINDOWS_PLUS_PLUGIN_H_ +#define FLUTTER_PLUGIN_CONNECTIVITY_WINDOWS_PLUS_PLUGIN_H_ #include diff --git a/packages/connectivity_plus/connectivity_plus_windows/windows/include/connectivity_plus_windows/network_manager.h b/packages/connectivity_plus/connectivity_plus/windows/include/connectivity_plus/network_manager.h similarity index 100% rename from packages/connectivity_plus/connectivity_plus_windows/windows/include/connectivity_plus_windows/network_manager.h rename to packages/connectivity_plus/connectivity_plus/windows/include/connectivity_plus/network_manager.h diff --git a/packages/connectivity_plus/connectivity_plus_windows/windows/network_manager.cpp b/packages/connectivity_plus/connectivity_plus/windows/network_manager.cpp similarity index 98% rename from packages/connectivity_plus/connectivity_plus_windows/windows/network_manager.cpp rename to packages/connectivity_plus/connectivity_plus/windows/network_manager.cpp index fab46473c5..e009c7ed1b 100644 --- a/packages/connectivity_plus/connectivity_plus_windows/windows/network_manager.cpp +++ b/packages/connectivity_plus/connectivity_plus/windows/network_manager.cpp @@ -9,7 +9,7 @@ * See full license text in LICENSE file at top of project tree */ -#include "include/connectivity_plus_windows/network_manager.h" +#include "include/connectivity_plus/network_manager.h" #include #include diff --git a/packages/connectivity_plus/connectivity_plus_linux/.gitignore b/packages/connectivity_plus/connectivity_plus_linux/.gitignore deleted file mode 100644 index 88ce490e47..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -.DS_Store -.atom/ -.idea/ -.vscode/ - -.packages -.pub/ -.dart_tool/ -pubspec.lock -flutter_export_environment.sh - -examples/all_plugins/pubspec.yaml - -Podfile -Podfile.lock -Pods/ -.symlinks/ -**/Flutter/App.framework/ -**/Flutter/ephemeral/ -**/Flutter/Flutter.framework/ -**/Flutter/Generated.xcconfig -**/Flutter/flutter_assets/ - -ServiceDefinitions.json -xcuserdata/ -**/DerivedData/ - -local.properties -keystore.properties -.gradle/ -gradlew -gradlew.bat -gradle-wrapper.jar -.flutter-plugins-dependencies -*.iml - -generated_plugin_registrant.dart -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m -GeneratedPluginRegistrant.java -GeneratedPluginRegistrant.swift -build/ -.flutter-plugins - -.project -.classpath -.settings diff --git a/packages/connectivity_plus/connectivity_plus_linux/.metadata b/packages/connectivity_plus/connectivity_plus_linux/.metadata deleted file mode 100644 index 6b9d686e29..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 34541c30735bc1086335e13d69a7e0acdc0538c5 - channel: master - -project_type: package diff --git a/packages/connectivity_plus/connectivity_plus_linux/CHANGELOG.md b/packages/connectivity_plus/connectivity_plus_linux/CHANGELOG.md deleted file mode 100644 index 9d275c899e..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -## 1.3.1 - -- Update flutter_lints to 2.0.1 -- Update dev dependencies -- Resolve analyzer issues - -## 1.3.0 - -- Bump nm plugin to 0.5.0 - -## 1.2.0 - -- Add bluetooth as connectivity result - -## 1.1.1 - -- Dependencies update - -## 1.1.0 - -- Add ethernet as connectivity result - -## 1.0.3 - -- Update D-Bus package dependency - -## 1.0.2 - -- Update connectivity plus - -## 1.0.1 - -- Improve documentation - -## 1.0.0 - -- Migrated to null safety -- Fixed a case with an unhandled exception - -## 0.3.1 - -- Address pub score - -## 0.3.0 - -- Removed members that were moved to network_info_plus - -## 0.2.0 - -- Upgrade to latest platform interface - -## 0.1.0 - -- Initial release for Linux. diff --git a/packages/connectivity_plus/connectivity_plus_linux/LICENSE b/packages/connectivity_plus/connectivity_plus_linux/LICENSE deleted file mode 100644 index 0c91662b3f..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/connectivity_plus/connectivity_plus_linux/README.md b/packages/connectivity_plus/connectivity_plus_linux/README.md deleted file mode 100644 index bdedb3d90d..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Connectivity Plus Linux - -[![Flutter Community: connectivity_plus_linux](https://fluttercommunity.dev/_github/header/connectivity_plus_linux)](https://github.com/fluttercommunity/community) - -[![pub package](https://img.shields.io/pub/v/connectivity_plus_linux.svg)](https://pub.dev/packages/connectivity_plus_linux) - -The Linux implementation of [`connectivity_plus`](https://pub.dev/packages/connectivity_plus). - -## Usage - -This package is already included as part of the `connectivity_plus` package dependency, and will -be included when using `connectivity_plus` as normal. diff --git a/packages/connectivity_plus/connectivity_plus_linux/lib/connectivity_plus_linux.dart b/packages/connectivity_plus/connectivity_plus_linux/lib/connectivity_plus_linux.dart deleted file mode 100644 index 8d035e5da7..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/lib/connectivity_plus_linux.dart +++ /dev/null @@ -1,4 +0,0 @@ -/// The Linux implementation of `connectivity_plus`. -library connectivity_plus_linux; - -export 'src/connectivity.dart'; diff --git a/packages/connectivity_plus/connectivity_plus_linux/pubspec.yaml b/packages/connectivity_plus/connectivity_plus_linux/pubspec.yaml deleted file mode 100644 index 787d8e33a8..0000000000 --- a/packages/connectivity_plus/connectivity_plus_linux/pubspec.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: connectivity_plus_linux -description: Linux implementation of the connectivity_plus plugin -homepage: https://plus.fluttercommunity.dev/ -repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/ -version: 1.3.1 - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.20.0" - -dependencies: - flutter: - sdk: flutter - connectivity_plus_platform_interface: ^1.2.0 - meta: ^1.7.0 - nm: ^0.5.0 - -dev_dependencies: - flutter_test: - sdk: flutter - build_runner: ^2.1.11 - dbus: ^0.7.5 - mockito: ^5.2.0 - flutter_lints: ^2.0.1 - -flutter: - plugin: - implements: connectivity_plus - platforms: - linux: - dartPluginClass: ConnectivityLinux - pluginClass: none diff --git a/packages/connectivity_plus/connectivity_plus_macos/.gitattributes b/packages/connectivity_plus/connectivity_plus_macos/.gitattributes deleted file mode 100644 index 31fda4bf1c..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/.gitattributes +++ /dev/null @@ -1,25 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Always perform LF normalization on these files -*.dart text -*.gradle text -*.html text -*.java text -*.json text -*.md text -*.py text -*.sh text -*.txt text -*.xml text -*.yaml text - -# Make sure that these Windows files always have CRLF line endings in checkout -*.bat text eol=crlf -*.ps1 text eol=crlf - -# Never perform LF normalization on these files -*.ico binary -*.jar binary -*.png binary -*.zip binary diff --git a/packages/connectivity_plus/connectivity_plus_macos/.gitignore b/packages/connectivity_plus/connectivity_plus_macos/.gitignore deleted file mode 100644 index 88ce490e47..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -.DS_Store -.atom/ -.idea/ -.vscode/ - -.packages -.pub/ -.dart_tool/ -pubspec.lock -flutter_export_environment.sh - -examples/all_plugins/pubspec.yaml - -Podfile -Podfile.lock -Pods/ -.symlinks/ -**/Flutter/App.framework/ -**/Flutter/ephemeral/ -**/Flutter/Flutter.framework/ -**/Flutter/Generated.xcconfig -**/Flutter/flutter_assets/ - -ServiceDefinitions.json -xcuserdata/ -**/DerivedData/ - -local.properties -keystore.properties -.gradle/ -gradlew -gradlew.bat -gradle-wrapper.jar -.flutter-plugins-dependencies -*.iml - -generated_plugin_registrant.dart -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m -GeneratedPluginRegistrant.java -GeneratedPluginRegistrant.swift -build/ -.flutter-plugins - -.project -.classpath -.settings diff --git a/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md b/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md deleted file mode 100644 index 655c6714a7..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/CHANGELOG.md +++ /dev/null @@ -1,105 +0,0 @@ -## 1.2.6 - -- Discard unused warnings for `switch reachability.connection ?? .unavailable` in macOS by removing `?? .unavailable` as left side of nil coalescing operator '??' has non-optional type 'Reachability.Connection', so the right side is never used. - -## 1.2.5 - -- Discard unused warnings for `ensurePathMonitor` & `ensureReachability` call in macOS. - -## 1.2.4 - -- Stop sending events once flutter engine detached - -## 1.2.3 - -- Send events on main thread - -## 1.2.2 - -- Fix connectivity stream can not be reused (after hot-restart) on MacOS 10.14+. - -## 1.2.1 - -- Update license headers. - -## 1.2.0 - -- Backport to macOS 10.11 - -## 1.1.0 - -- Add ethernet as connectivity result. - - NOTE: The functionality is provided by NWPathMonitor, which is available since - macOS 10.14. Therefore the minimum macOS deployment target has been changed - from 10.11 to 10.14 - -## 1.0.2 - -- Update connectivity plus - -## 1.0.1 - -- Improve documentation - -## 1.0.0 - -- Migrated to null safety - -## 0.4.1 - -- Address pub score - -## 0.4.0 - -- Removed members that were moved to network_info_plus - -## 0.3.0 - -- Updated platform interface - -## 0.2.0 - -- Transfer to plus-plugins monorepo - -## 0.1.0+6 - -- Transfer package to Flutter Community under new name `connectivity_plus_macos`. - -## 0.1.0+5 - -- Update package:e2e reference to use the local version in the flutter/plugins - repository. - -## 0.1.0+4 - -- Remove Android folder from `connectivity_macos`. - -## 0.1.0+3 - -- Bump the minimum Flutter version to 1.12.13+hotfix.5. -- Clean up various Android workarounds no longer needed after framework v1.12. -- Complete v2 embedding support. -- Fix CocoaPods podspec lint warnings. -- Declare API stability and compatibility with `1.0.0` (more details at: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0). - -## 0.1.0+2 - -- Remove hard coded ios workspace setting of the example app. - -## 0.1.0+1 - -- Make the pedantic dev_dependency explicit. - -## 0.1.0 - -- Adds an example app to trigger CI tests. Bumped the MINOR version to - avoid compatibility issues once this packages is endorsed. - -## 0.0.2+1 - -- Add CHANGELOG. - -## 0.0.1 - -- Initial open source release. diff --git a/packages/connectivity_plus/connectivity_plus_macos/LICENSE b/packages/connectivity_plus/connectivity_plus_macos/LICENSE deleted file mode 100644 index 0c382ce171..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/connectivity_plus/connectivity_plus_macos/README.md b/packages/connectivity_plus/connectivity_plus_macos/README.md deleted file mode 100644 index 23f92ca6a0..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Connectivity Plus macOS - -[![Flutter Community: connectivity_plus_macos](https://fluttercommunity.dev/_github/header/connectivity_plus_macos)](https://github.com/fluttercommunity/community) - -[![pub package](https://img.shields.io/pub/v/connectivity_plus_macos.svg)](https://pub.dev/packages/connectivity_plus_macos) - -The macOS implementation of [`connectivity_plus`](https://pub.dev/packages/connectivity_plus). - -## Usage - -This package is already included as part of the `connectivity_plus` package dependency, and will -be included when using `connectivity_plus` as normal. diff --git a/packages/connectivity_plus/connectivity_plus_macos/lib/connectivity_plus_macos.dart b/packages/connectivity_plus/connectivity_plus_macos/lib/connectivity_plus_macos.dart deleted file mode 100644 index 7be7b143ca..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/lib/connectivity_plus_macos.dart +++ /dev/null @@ -1,3 +0,0 @@ -// Analyze will fail if there is no main.dart file. This file should -// be removed once an example app has been added to connectivity_macos. -// https://github.com/flutter/flutter/issues/51007 diff --git a/packages/connectivity_plus/connectivity_plus_macos/macos/connectivity_plus_macos.podspec b/packages/connectivity_plus/connectivity_plus_macos/macos/connectivity_plus_macos.podspec deleted file mode 100644 index c619b04cbd..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/macos/connectivity_plus_macos.podspec +++ /dev/null @@ -1,22 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# -Pod::Spec.new do |s| - s.name = 'connectivity_plus_macos' - s.version = '0.0.1' - s.summary = 'Flutter plugin for checking connectivity' - s.description = <<-DESC - Desktop implementation of the connectivity plugin - DESC - s.homepage = 'https://plus.fluttercommunity.dev/' - s.license = { :type => 'BSD', :file => '../LICENSE' } - s.author = { 'Flutter Community Team' => 'authors@fluttercommunity.dev' } - s.source = { :http => 'https://github.com/fluttercommunity/plus_plugins' } - s.documentation_url = 'https://pub.dev/packages/connectivity_plus' - s.source_files = 'Classes/**/*' - s.dependency 'FlutterMacOS' - s.dependency 'ReachabilitySwift' - - s.platform = :osx - s.osx.deployment_target = '10.11' -end diff --git a/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml b/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml deleted file mode 100644 index 2ce64236c0..0000000000 --- a/packages/connectivity_plus/connectivity_plus_macos/pubspec.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: connectivity_plus_macos -description: macOS implementation of the connectivity_plus plugin. -version: 1.2.6 -homepage: https://plus.fluttercommunity.dev/ -repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/ - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.20.0" - -flutter: - plugin: - platforms: - macos: - pluginClass: ConnectivityPlugin - -dependencies: - connectivity_plus_platform_interface: ^1.1.0 - flutter: - sdk: flutter diff --git a/packages/connectivity_plus/connectivity_plus_web/.gitattributes b/packages/connectivity_plus/connectivity_plus_web/.gitattributes deleted file mode 100644 index 31fda4bf1c..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/.gitattributes +++ /dev/null @@ -1,25 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Always perform LF normalization on these files -*.dart text -*.gradle text -*.html text -*.java text -*.json text -*.md text -*.py text -*.sh text -*.txt text -*.xml text -*.yaml text - -# Make sure that these Windows files always have CRLF line endings in checkout -*.bat text eol=crlf -*.ps1 text eol=crlf - -# Never perform LF normalization on these files -*.ico binary -*.jar binary -*.png binary -*.zip binary diff --git a/packages/connectivity_plus/connectivity_plus_web/.gitignore b/packages/connectivity_plus/connectivity_plus_web/.gitignore deleted file mode 100644 index 88ce490e47..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -.DS_Store -.atom/ -.idea/ -.vscode/ - -.packages -.pub/ -.dart_tool/ -pubspec.lock -flutter_export_environment.sh - -examples/all_plugins/pubspec.yaml - -Podfile -Podfile.lock -Pods/ -.symlinks/ -**/Flutter/App.framework/ -**/Flutter/ephemeral/ -**/Flutter/Flutter.framework/ -**/Flutter/Generated.xcconfig -**/Flutter/flutter_assets/ - -ServiceDefinitions.json -xcuserdata/ -**/DerivedData/ - -local.properties -keystore.properties -.gradle/ -gradlew -gradlew.bat -gradle-wrapper.jar -.flutter-plugins-dependencies -*.iml - -generated_plugin_registrant.dart -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m -GeneratedPluginRegistrant.java -GeneratedPluginRegistrant.swift -build/ -.flutter-plugins - -.project -.classpath -.settings diff --git a/packages/connectivity_plus/connectivity_plus_web/.metadata b/packages/connectivity_plus/connectivity_plus_web/.metadata deleted file mode 100644 index 23eb55ba6d..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 52ee8a6c6565cd421dfa32042941eb40691f4746 - channel: master - -project_type: plugin diff --git a/packages/connectivity_plus/connectivity_plus_web/CHANGELOG.md b/packages/connectivity_plus/connectivity_plus_web/CHANGELOG.md deleted file mode 100644 index 5468378e14..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/CHANGELOG.md +++ /dev/null @@ -1,89 +0,0 @@ -## 1.2.5 - - - **CHORE**: Version tagging using melos. - -## 1.2.4 - -- Fix stream fallback for unsupported browsers - -## 1.2.3 - -- fix Bad state: Stream has already been listened to (#943) - -## 1.2.2 - -- Disables internal use of `NetworkInformationAPI` which is still experimental - -## 1.2.1 - -- Update flutter_lints to 2.0.1 -- Update dev dependencies - -## 1.2.0 - -- Add bluetooth as connectivity result - -## 1.1.0+1 - -- Fix platform interface dependency - -## 1.1.0 - -- Add ethernet as connectivity result - -## 1.0.2 - -- Update connectivity plus - -## 1.0.1 - -- Improve documentation - -## 1.0.0 - -- Migrated to null safety - -## 0.6.1 - -- Address pub score - -## 0.6.0 - -- Removed members that were moved to network_info_plus - -## 0.5.0 - -- Updated platform interface - -## 0.4.0 - -- Transfer to plus-plugins monorepo - -## 0.3.1+3 - -- Transfer package to Flutter Community under new name `connectivity_plus_web`. - -## 0.3.1+2 - -- Update package:e2e to use package:integration_test - -## 0.3.1+1 - -- Update package:e2e reference to use the local version in the flutter/plugins - repository. - -## 0.3.1 - -- Use NetworkInformation API from dart:html, instead of the JS-interop version. - -## 0.3.0 - -- Rename from "experimental_connectivity_web" to "connectivity_web", and move to flutter/plugins master. - -## 0.2.0 - -- Add fallback on dart:html for browsers where NetworkInformationAPI is not supported. - -## 0.1.0 - -- Initial release. diff --git a/packages/connectivity_plus/connectivity_plus_web/LICENSE b/packages/connectivity_plus/connectivity_plus_web/LICENSE deleted file mode 100644 index 4da9688730..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright 2016, the Flutter project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/connectivity_plus/connectivity_plus_web/README.md b/packages/connectivity_plus/connectivity_plus_web/README.md deleted file mode 100644 index b42eb86081..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Connectivity Plus Web - -[![Flutter Community: connectivity_plus_web](https://fluttercommunity.dev/_github/header/connectivity_plus_web)](https://github.com/fluttercommunity/community) - -[![pub package](https://img.shields.io/pub/v/connectivity_plus_web.svg)](https://pub.dev/packages/connectivity_plus_web) - -The Web implementation of [`connectivity_plus`](https://pub.dev/packages/connectivity_plus). - -## Usage - -This package is already included as part of the `connectivity_plus` package dependency, and will -be included when using `connectivity_plus` as normal. diff --git a/packages/connectivity_plus/connectivity_plus_web/example/.gitignore b/packages/connectivity_plus/connectivity_plus_web/example/.gitignore deleted file mode 100644 index d7dee828a6..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ -lib/generated_plugin_registrant.dart diff --git a/packages/connectivity_plus/connectivity_plus_web/example/lib/main.dart b/packages/connectivity_plus/connectivity_plus_web/example/lib/main.dart deleted file mode 100644 index 4365c99a70..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/lib/main.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; - -void main() => runApp(MyApp()); - -/// App Testing -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - @override - Widget build(BuildContext context) { - return Text('A Placeholder file for integration tests.'); - } -} diff --git a/packages/connectivity_plus/connectivity_plus_web/example/pubspec.yaml b/packages/connectivity_plus/connectivity_plus_web/example/pubspec.yaml deleted file mode 100644 index 2ef584da28..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/pubspec.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: connectivity_plus_web_example -description: Example web app for the connectivity plugin - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.26.0-0" - -dependencies: - connectivity_plus_web: - path: ../../connectivity_plus_web - flutter_web_plugins: - sdk: flutter - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_driver: - sdk: flutter - integration_test: - sdk: flutter - mockito: ^5.0.0 - -dependency_overrides: - args: ^2.0.0 - convert: ^3.0.0 - crypto: ^3.0.0 diff --git a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/README.md b/packages/connectivity_plus/connectivity_plus_web/example/test_driver/README.md deleted file mode 100644 index 19a59dbe4f..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Running tests -- `chromedriver -port=4444` -- `flutter drive --target=test_driver/connectivity_plus_example.dart --show-web-server-device -d web-server` diff --git a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/connectivity_plus_example.dart b/packages/connectivity_plus/connectivity_plus_web/example/test_driver/connectivity_plus_example.dart deleted file mode 100644 index 233e4222ac..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/connectivity_plus_example.dart +++ /dev/null @@ -1,77 +0,0 @@ -//@dart=2.9 - -import 'package:integration_test/integration_test.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart'; -import 'package:connectivity_plus_web/src/network_information_api_connectivity_plugin.dart'; - -import 'package:mockito/mockito.dart'; - -import 'src/connectivity_mocks.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('checkConnectivity', () { - void testCheckConnectivity({ - String type, - String effectiveType, - num downlink = 10, - num rtt = 50, - ConnectivityResult expected, - }) { - final connection = MockNetworkInformation(); - when(connection.type).thenReturn(type); - when(connection.effectiveType).thenReturn(effectiveType); - when(connection.downlink).thenReturn(downlink); - when(connection.rtt).thenReturn(downlink); - - final plugin = - NetworkInformationApiConnectivityPlugin.withConnection(connection); - expect(plugin.checkConnectivity(), completion(equals(expected))); - } - - test('0 downlink and rtt -> none', () { - testCheckConnectivity( - effectiveType: '4g', - downlink: 0, - rtt: 0, - expected: ConnectivityResult.none); - }); - test('slow-2g -> mobile', () { - testCheckConnectivity( - effectiveType: 'slow-2g', expected: ConnectivityResult.mobile); - }); - test('2g -> mobile', () { - testCheckConnectivity( - effectiveType: '2g', expected: ConnectivityResult.mobile); - }); - test('3g -> mobile', () { - testCheckConnectivity( - effectiveType: '3g', expected: ConnectivityResult.mobile); - }); - test('4g -> wifi', () { - testCheckConnectivity( - effectiveType: '4g', expected: ConnectivityResult.wifi); - }); - }); - - group('get onConnectivityChanged', () { - test('puts change events in a Stream', () { - final connection = MockNetworkInformation(); - final plugin = - NetworkInformationApiConnectivityPlugin.withConnection(connection); - final results = plugin.onConnectivityChanged; - - // Fake a disconnect-reconnect - connection.mockChangeValue(downlink: 0, rtt: 0); - connection.mockChangeValue(downlink: 10, rtt: 50, effectiveType: '4g'); - - // The stream of results is infinite, so we need to .take(2) for this test to complete. - expect( - results.take(2).toList(), - completion( - equals([ConnectivityResult.none, ConnectivityResult.wifi]))); - }); - }); -} diff --git a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/connectivity_plus_example_test.dart b/packages/connectivity_plus/connectivity_plus_web/example/test_driver/connectivity_plus_example_test.dart deleted file mode 100644 index a19390bb56..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/connectivity_plus_example_test.dart +++ /dev/null @@ -1,5 +0,0 @@ -//@dart=2.9 - -import 'package:integration_test/integration_test_driver.dart'; - -Future main() async => integrationDriver(); diff --git a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/src/connectivity_mocks.dart b/packages/connectivity_plus/connectivity_plus_web/example/test_driver/src/connectivity_mocks.dart deleted file mode 100644 index 8d1cc0be29..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/test_driver/src/connectivity_mocks.dart +++ /dev/null @@ -1,27 +0,0 @@ -//@dart=2.9 - -import 'dart:html'; - -import 'package:mockito/mockito.dart'; - -/// A Mock implementation of the NetworkInformation API that allows -/// for external modification of its values. -class MockNetworkInformation extends Mock implements NetworkInformation { - /// The callback that will fire after the network information values change. - Function onchange; - - /// Changes the desired values, and triggers the change event listener. - void mockChangeValue({ - String type, - String effectiveType, - num downlink, - num rtt, - }) async { - when(this.type).thenAnswer((_) => type); - when(this.effectiveType).thenAnswer((_) => effectiveType); - when(this.downlink).thenAnswer((_) => downlink); - when(this.rtt).thenAnswer((_) => rtt); - - onchange(Event('change')); - } -} diff --git a/packages/connectivity_plus/connectivity_plus_web/example/web/index.html b/packages/connectivity_plus/connectivity_plus_web/example/web/index.html deleted file mode 100644 index 6eff9a740d..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/example/web/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - example - - - - - diff --git a/packages/connectivity_plus/connectivity_plus_web/pubspec.yaml b/packages/connectivity_plus/connectivity_plus_web/pubspec.yaml deleted file mode 100644 index c27e4e328f..0000000000 --- a/packages/connectivity_plus/connectivity_plus_web/pubspec.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: connectivity_plus_web -description: An implementation for the web platform of the Flutter `connectivity_plus` plugin. This uses the NetworkInformation Web API, with a fallback to Navigator.onLine. -version: 1.2.5 -homepage: https://plus.fluttercommunity.dev/ -repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/ - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.20.0" - -flutter: - plugin: - platforms: - web: - pluginClass: ConnectivityPlusPlugin - fileName: connectivity_plus_web.dart - -dependencies: - connectivity_plus_platform_interface: ^1.2.0 - flutter_web_plugins: - sdk: flutter - flutter: - sdk: flutter - js: ^0.6.3 - -dev_dependencies: - test: ^1.21.1 - flutter_test: - sdk: flutter - flutter_lints: ^2.0.1 diff --git a/packages/connectivity_plus/connectivity_plus_windows/.gitignore b/packages/connectivity_plus/connectivity_plus_windows/.gitignore deleted file mode 100644 index e9dc58d3d6..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ diff --git a/packages/connectivity_plus/connectivity_plus_windows/.metadata b/packages/connectivity_plus/connectivity_plus_windows/.metadata deleted file mode 100644 index 4d567a15e5..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: c40e5294dda34d04cd222dfdf765f171e12e4a8d - channel: dev - -project_type: plugin diff --git a/packages/connectivity_plus/connectivity_plus_windows/CHANGELOG.md b/packages/connectivity_plus/connectivity_plus_windows/CHANGELOG.md deleted file mode 100644 index 53d775f3db..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -## 1.2.2 - -- Revert changes in 1.2.1 - -## 1.2.1 - -- Fixes a crash when adding a listener to a destroyed channel - -## 1.2.0 - -- Add ethernet as connectivity result. - -## 1.1.0 - -- Update connectivity plus - -## 1.0.2 - -- Update connectivity plus - -## 1.0.1 - -- Improve documentation - -## 1.0.0 - -- Migrated to null safety - -## 0.1.1 - -- Address pub score - -## 0.1.0 - -- Initial release for Windows. diff --git a/packages/connectivity_plus/connectivity_plus_windows/LICENSE b/packages/connectivity_plus/connectivity_plus_windows/LICENSE deleted file mode 100644 index 0c91662b3f..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/connectivity_plus/connectivity_plus_windows/README.md b/packages/connectivity_plus/connectivity_plus_windows/README.md deleted file mode 100644 index fbbcc033bd..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Connectivity Plus Windows - -[![Flutter Community: connectivity_plus_windows](https://fluttercommunity.dev/_github/header/connectivity_plus_windows)](https://github.com/fluttercommunity/community) - -[![pub package](https://img.shields.io/pub/v/connectivity_plus_windows.svg)](https://pub.dev/packages/connectivity_plus_windows) - -The Windows implementation of [`connectivity_plus`](https://pub.dev/packages/connectivity_plus). - -## Usage - -This package is already included as part of the `connectivity_plus` package dependency, and will -be included when using `connectivity_plus` as normal. diff --git a/packages/connectivity_plus/connectivity_plus_windows/lib/connectivity_plus_windows.dart b/packages/connectivity_plus/connectivity_plus_windows/lib/connectivity_plus_windows.dart deleted file mode 100644 index c33a4a47f2..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/lib/connectivity_plus_windows.dart +++ /dev/null @@ -1,3 +0,0 @@ -// The connectivity_plus_platform_interface defaults to MethodChannelConnectivity -// as its instance, which is all the Windows implementation needs. This file -// is here to silence warnings when publishing to pub. diff --git a/packages/connectivity_plus/connectivity_plus_windows/pubspec.yaml b/packages/connectivity_plus/connectivity_plus_windows/pubspec.yaml deleted file mode 100644 index 362a476efc..0000000000 --- a/packages/connectivity_plus/connectivity_plus_windows/pubspec.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: connectivity_plus_windows -description: Windows implementation of the connectivity_plus plugin -homepage: https://plus.fluttercommunity.dev/ -repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/ -version: 1.2.2 - -environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.20.0" - -dependencies: - connectivity_plus_platform_interface: ^1.1.0 - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - -flutter: - plugin: - platforms: - windows: - pluginClass: ConnectivityPlusWindowsPlugin