Skip to content

Commit

Permalink
Bumped dependencies to support Flutter 3 with Dart 3 (#58)
Browse files Browse the repository at this point in the history
If you use connectivity_plus for other purposes, you cannot use the
latest versions supported by Flutter3 and Dart 3.
I took the chance to bump the dependencies for this awesome package as
it's not been updated for a while.

I also updated the CI script, If you want me to perform some changes,
feel free to point them out here.

Closes #57
  • Loading branch information
jogboms authored Jul 7, 2023
2 parents 72bc05b + 28c1d2d commit b986352
Show file tree
Hide file tree
Showing 16 changed files with 259 additions and 300 deletions.
1 change: 0 additions & 1 deletion .flutter-plugins

This file was deleted.

19 changes: 12 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ 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"
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: 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
fail_ci_if_error: true
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.0.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`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: "^3.0.0"
```
### ⚡️ Import
Expand Down
3 changes: 0 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
}
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions example/lib/widgets/demo_1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Widget>[
children: <Widget>[
Text('OFFLINE'),
SizedBox(width: 8.0),
SizedBox(
Expand All @@ -49,9 +49,9 @@ class Demo1 extends StatelessWidget {
],
);
},
child: Column(
child: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
children: <Widget>[
Text(
'There are no bottons to push :)',
),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/widgets/demo_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class Demo2 extends StatelessWidget {
}
},
builder: (BuildContext context) {
return Center(
return const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
children: <Widget>[
Text(
'There are no bottons to push :)',
),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/widgets/demo_3.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class Demo3 extends StatelessWidget {
}
return child;
},
child: Center(
child: const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
children: <Widget>[
Text(
'There are no bottons to push :)',
),
Expand Down
Loading

0 comments on commit b986352

Please sign in to comment.