From 7c5465edbcf3d0287f677d18b0312e8e186a8fb8 Mon Sep 17 00:00:00 2001 From: Angelo Cassano Date: Thu, 6 Jul 2023 14:23:34 +0200 Subject: [PATCH 1/4] Bumped dependencies to support Flutter 3 with Dart 3 --- .flutter-plugins | 1 - .github/workflows/main.yml | 9 +- CHANGELOG.md | 4 + README.md | 2 +- analysis_options.yaml | 3 - example/android/app/build.gradle | 4 +- example/android/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/lib/widgets/demo_1.dart | 8 +- example/lib/widgets/demo_2.dart | 4 +- example/lib/widgets/demo_3.dart | 4 +- example/pubspec.lock | 236 ++++++++---------- example/pubspec.yaml | 4 +- lib/src/utils.dart | 14 +- pubspec.lock | 236 ++++++++---------- pubspec.yaml | 12 +- 16 files changed, 252 insertions(+), 297 deletions(-) delete mode 100644 .flutter-plugins diff --git a/.flutter-plugins b/.flutter-plugins deleted file mode 100644 index 47a6021..0000000 --- a/.flutter-plugins +++ /dev/null @@ -1 +0,0 @@ -connectivity=/Users/apple/.pub-cache/hosted/pub.dartlang.org/connectivity-0.3.1/ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 798a873..183d77f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,11 +16,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: - java-version: "12.x" - - uses: subosito/flutter-action@v1 + distribution: 'zulu' + java-version: '17' + - uses: subosito/flutter-action@v2 with: channel: "dev" - run: flutter pub get diff --git a/CHANGELOG.md b/CHANGELOG.md index aa79765..e66c7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [2.2.0] + +Bumped dependencies to support Flutter 3 with Dart 3 + ## [2.1.0] - Migrate dependencies to plus packages. `package:connectivity_plus` and `package:network_info_plus` diff --git a/README.md b/README.md index 225842c..2207f64 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A tidy utility to handle offline/online connectivity like a Boss. It provides su ```yaml dependencies: - flutter_offline: "^2.1.0" + flutter_offline: "^2.2.0" ``` ### ⚡️ Import diff --git a/analysis_options.yaml b/analysis_options.yaml index a9c50c0..4a56424 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,9 +1,6 @@ include: package:flutter_lints/flutter.yaml analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false errors: missing_required_param: error missing_return: error diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 5fe3c92..493156e 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -28,6 +28,8 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion flutter.compileSdkVersion + namespace 'com.example.example' + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -44,7 +46,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.example" - minSdkVersion flutter.minSdkVersion + minSdkVersion 19 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/example/android/build.gradle b/example/android/build.gradle index 24047dc..fb589d2 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.9.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index bc6a58a..cfe88f6 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip diff --git a/example/lib/widgets/demo_1.dart b/example/lib/widgets/demo_1.dart index 1ef9dd9..dd432a4 100644 --- a/example/lib/widgets/demo_1.dart +++ b/example/lib/widgets/demo_1.dart @@ -28,9 +28,9 @@ class Demo1 extends StatelessWidget { duration: const Duration(milliseconds: 350), child: connected ? const Text('ONLINE') - : Row( + : const Row( mainAxisAlignment: MainAxisAlignment.center, - children: const [ + children: [ Text('OFFLINE'), SizedBox(width: 8.0), SizedBox( @@ -49,9 +49,9 @@ class Demo1 extends StatelessWidget { ], ); }, - child: Column( + child: const Column( mainAxisAlignment: MainAxisAlignment.center, - children: const [ + children: [ Text( 'There are no bottons to push :)', ), diff --git a/example/lib/widgets/demo_2.dart b/example/lib/widgets/demo_2.dart index cd6996a..81a93fd 100644 --- a/example/lib/widgets/demo_2.dart +++ b/example/lib/widgets/demo_2.dart @@ -27,10 +27,10 @@ class Demo2 extends StatelessWidget { } }, builder: (BuildContext context) { - return Center( + return const Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: const [ + children: [ Text( 'There are no bottons to push :)', ), diff --git a/example/lib/widgets/demo_3.dart b/example/lib/widgets/demo_3.dart index e845dc1..46897ec 100644 --- a/example/lib/widgets/demo_3.dart +++ b/example/lib/widgets/demo_3.dart @@ -26,10 +26,10 @@ class Demo3 extends StatelessWidget { } return child; }, - child: Center( + child: const Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, - children: const [ + children: [ Text( 'There are no bottons to push :)', ), diff --git a/example/pubspec.lock b/example/pubspec.lock index 86893b1..4cf83e6 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,114 +5,90 @@ packages: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "0bd9a99b6eb96f07af141f0eb53eace8983e8e5aa5de59777aca31684680ef22" + url: "https://pub.dev" source: hosted version: "2.3.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.17.1" connectivity_plus: dependency: transitive description: name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" + sha256: "8599ae9edca5ff96163fca3e36f8e481ea917d1e71cdad912c084b5579913f34" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "4.0.1" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" + sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a + url: "https://pub.dev" source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.2.4" dbus: dependency: transitive description: name: dbus - url: "https://pub.dartlang.org" + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" source: hosted - version: "0.6.8" + version: "0.7.8" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "2.0.2" flutter: dependency: "direct main" description: flutter @@ -122,16 +98,17 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.2" flutter_offline: dependency: "direct main" description: path: ".." relative: true source: path - version: "2.1.0" + version: "2.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -146,98 +123,88 @@ packages: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "0.6.7" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "2.1.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.15" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" + source: hosted + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.9.1" network_info_plus: dependency: transitive description: name: network_info_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - network_info_plus_linux: - dependency: transitive - description: - name: network_info_plus_linux - url: "https://pub.dartlang.org" + sha256: "5a79c244070fb7f7d10fbcfa24eed315252b4e662f42658029871d31afdbba9e" + url: "https://pub.dev" source: hosted - version: "1.1.1" - network_info_plus_macos: - dependency: transitive - description: - name: network_info_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "4.0.1" network_info_plus_platform_interface: dependency: transitive description: name: network_info_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: "881f5029c5edaf19c616c201d3d8b366c5b1384afd5c1da5a49e4345de82fb8b" + url: "https://pub.dev" source: hosted - version: "1.1.1" - network_info_plus_web: - dependency: transitive - description: - name: network_info_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - network_info_plus_windows: - dependency: transitive - description: - name: network_info_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" + version: "1.1.3" nm: dependency: transitive description: name: nm - url: "https://pub.dartlang.org" + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" + url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "0.5.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.8.3" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "5.4.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757" + url: "https://pub.dev" source: hosted version: "2.1.2" sky_engine: @@ -249,65 +216,74 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.3" - typed_data: + version: "0.5.1" + vector_math: dependency: transitive description: - name: typed_data - url: "https://pub.dartlang.org" + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "1.3.0" - vector_math: + version: "2.1.4" + win32: dependency: transitive description: - name: vector_math - url: "https://pub.dartlang.org" + name: win32 + sha256: dfdf0136e0aa7a1b474ea133e67cb0154a0acd2599c4f3ada3b49d38d38793ee + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "5.0.5" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "6.3.0" sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=3.0.0 <4.0.0" + flutter: ">=3.3.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index f978860..27a87a4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 publish_to: none environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: @@ -14,7 +14,7 @@ dependencies: path: ../ dev_dependencies: - flutter_lints: ^1.0.4 + flutter_lints: ^2.0.2 flutter_test: sdk: flutter diff --git a/lib/src/utils.dart b/lib/src/utils.dart index db7929e..fe5382a 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -5,21 +5,21 @@ import 'package:connectivity_plus/connectivity_plus.dart'; StreamTransformer debounce( Duration debounceDuration, ) { - var _seenFirstData = false; - Timer? _debounceTimer; + var seenFirstData = false; + Timer? debounceTimer; return StreamTransformer.fromHandlers( handleData: (ConnectivityResult data, EventSink sink) { - if (_seenFirstData) { - _debounceTimer?.cancel(); - _debounceTimer = Timer(debounceDuration, () => sink.add(data)); + if (seenFirstData) { + debounceTimer?.cancel(); + debounceTimer = Timer(debounceDuration, () => sink.add(data)); } else { sink.add(data); - _seenFirstData = true; + seenFirstData = true; } }, handleDone: (EventSink sink) { - _debounceTimer?.cancel(); + debounceTimer?.cancel(); sink.close(); }, ); diff --git a/pubspec.lock b/pubspec.lock index b1fa1d7..0a7af25 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,114 +5,90 @@ packages: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "0bd9a99b6eb96f07af141f0eb53eace8983e8e5aa5de59777aca31684680ef22" + url: "https://pub.dev" source: hosted version: "2.3.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.17.1" connectivity_plus: dependency: "direct main" description: name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" + sha256: "8599ae9edca5ff96163fca3e36f8e481ea917d1e71cdad912c084b5579913f34" + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "4.0.1" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" + sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.4" dbus: dependency: transitive description: name: dbus - url: "https://pub.dartlang.org" + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" source: hosted - version: "0.6.8" + version: "0.7.8" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "2.0.2" flutter: dependency: "direct main" description: flutter @@ -122,9 +98,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -139,100 +116,90 @@ packages: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "0.6.7" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "2.1.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.15" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" + source: hosted + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.9.1" network_info_plus: dependency: "direct main" description: name: network_info_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - network_info_plus_linux: - dependency: transitive - description: - name: network_info_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - network_info_plus_macos: - dependency: transitive - description: - name: network_info_plus_macos - url: "https://pub.dartlang.org" + sha256: "5a79c244070fb7f7d10fbcfa24eed315252b4e662f42658029871d31afdbba9e" + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "4.0.1" network_info_plus_platform_interface: dependency: transitive description: name: network_info_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - network_info_plus_web: - dependency: transitive - description: - name: network_info_plus_web - url: "https://pub.dartlang.org" + sha256: "881f5029c5edaf19c616c201d3d8b366c5b1384afd5c1da5a49e4345de82fb8b" + url: "https://pub.dev" source: hosted - version: "1.0.1" - network_info_plus_windows: - dependency: transitive - description: - name: network_info_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" + version: "1.1.3" nm: dependency: transitive description: name: nm - url: "https://pub.dartlang.org" + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" + url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "0.5.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.8.3" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "5.4.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.4" sky_engine: dependency: transitive description: flutter @@ -242,65 +209,74 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + url: "https://pub.dev" source: hosted - version: "0.4.3" - typed_data: + version: "0.5.1" + vector_math: dependency: transitive description: - name: typed_data - url: "https://pub.dartlang.org" + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "1.3.0" - vector_math: + version: "2.1.4" + win32: dependency: transitive description: - name: vector_math - url: "https://pub.dartlang.org" + name: win32 + sha256: dfdf0136e0aa7a1b474ea133e67cb0154a0acd2599c4f3ada3b49d38d38793ee + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "5.0.5" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "6.3.0" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=3.0.0 <4.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index eb5ce3e..d1c694a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,19 @@ name: flutter_offline description: A tidy utility to handle offline/online connectivity like a Boss. -version: 2.1.0 +version: 2.2.0 homepage: https://github.com/jogboms/flutter_offline environment: - sdk: '>=2.12.0 <3.0.0' - flutter: ">=2.0.0" + sdk: '>=3.0.0 <4.0.0' + flutter: ">=3.0.0" dependencies: flutter: sdk: flutter - connectivity_plus: ^2.2.0 - network_info_plus: ^2.1.2 + connectivity_plus: ^4.0.1 + network_info_plus: ^4.0.1 dev_dependencies: - flutter_lints: ^1.0.4 + flutter_lints: ^2.0.2 flutter_test: sdk: flutter From 95c2aeb4aa58e72e2b9b1d9a91bb28c16df8a609 Mon Sep 17 00:00:00 2001 From: Angelo Cassano Date: Fri, 7 Jul 2023 10:22:37 +0200 Subject: [PATCH 2/4] Changed version to 3.0.0 --- .github/workflows/main.yml | 3 ++- CHANGELOG.md | 2 +- README.md | 2 +- example/pubspec.lock | 2 +- pubspec.yaml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 183d77f..ae6b0a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,8 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - channel: "dev" + channel: 'stable' + flutter-version: '3.10.5' - run: flutter pub get - run: flutter format --set-exit-if-changed -l 120 lib -l 120 example - run: flutter analyze lib example diff --git a/CHANGELOG.md b/CHANGELOG.md index e66c7d5..8116d33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [2.2.0] +## [3.0.0] Bumped dependencies to support Flutter 3 with Dart 3 diff --git a/README.md b/README.md index 2207f64..cfc5c54 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A tidy utility to handle offline/online connectivity like a Boss. It provides su ```yaml dependencies: - flutter_offline: "^2.2.0" + flutter_offline: "^3.0.0" ``` ### ⚡️ Import diff --git a/example/pubspec.lock b/example/pubspec.lock index 4cf83e6..b3683da 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -108,7 +108,7 @@ packages: path: ".." relative: true source: path - version: "2.2.0" + version: "3.0.0" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index d1c694a..f4d9338 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_offline description: A tidy utility to handle offline/online connectivity like a Boss. -version: 2.2.0 +version: 3.0.0 homepage: https://github.com/jogboms/flutter_offline environment: From ec6317a72e2983799d8cde9273544cab9ea65304 Mon Sep 17 00:00:00 2001 From: Jeremiah Ogbomo Date: Fri, 7 Jul 2023 17:19:21 +0200 Subject: [PATCH 3/4] Migrate from `flutter format` --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae6b0a8..3268181 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,11 +26,11 @@ jobs: channel: 'stable' flutter-version: '3.10.5' - run: flutter pub get - - run: flutter format --set-exit-if-changed -l 120 lib -l 120 example + - run: dart format --set-exit-if-changed -l 120 lib -l 120 example - run: flutter analyze lib example - run: flutter test --no-pub --coverage - name: Upload coverage to codecov uses: codecov/codecov-action@v1 with: - fail_ci_if_error: true \ No newline at end of file + fail_ci_if_error: true From 28c1d2df92500852208472bbd5311aaac2d54224 Mon Sep 17 00:00:00 2001 From: Jeremiah Ogbomo Date: Fri, 7 Jul 2023 17:22:17 +0200 Subject: [PATCH 4/4] Include flutter cache on CI --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3268181..ce3948f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,9 @@ jobs: with: channel: 'stable' flutter-version: '3.10.5' + cache: true + cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' + cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' - run: flutter pub get - run: dart format --set-exit-if-changed -l 120 lib -l 120 example - run: flutter analyze lib example