Skip to content

Commit 7a81aec

Browse files
authored
Merge pull request #68 from osociety/bug-fixes
Bug fixes
2 parents f1249fb + 035d8d2 commit 7a81aec

27 files changed

+127
-742
lines changed

.github/workflows/flutter.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: flutter --version
4040

4141
- name: Cache pubspec dependencies
42-
uses: actions/cache@v4.1.2
42+
uses: actions/cache@v4.2.4
4343
with:
4444
path: |
4545
${{ env.FLUTTER_HOME }}/.pub-cache
@@ -51,18 +51,6 @@ jobs:
5151
restore-keys: |
5252
build-pubspec-
5353
54-
- name: Cache build runner
55-
uses: actions/cache@v4.1.2
56-
with:
57-
path: |
58-
**/.dart_tool
59-
**/*.g.dart
60-
**/*.mocks.dart
61-
**/*.config.dart
62-
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }}
63-
restore-keys: |
64-
build-runner-
65-
6654
- name: Download pub dependencies
6755
run: flutter pub get
6856

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
needs: 'test'
4040
permissions:
4141
id-token: write # Required for authentication using OIDC
42-
uses: git-elliot/setup-dart/.github/workflows/flutter_publish.yml@main # Added build_runner step
42+
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
4343
with:
44-
environment: 'pub.dev'
45-
build_runner: true
44+
environment: 'pub.dev'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## 3.0.0
4+
Performance improvements
5+
36
## 2.0.5
47
Bug fixes and improvements
58

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ And initialize the pacakge in the main function
2828
await configureNetworkToolsFlutter((await getApplicationDocumentsDirectory()).path);
2929
```
3030

31-
From here please follow the documentation of [network_tools](https://pub.dev/packages/network_tools) as they are the same.
31+
32+
## Example
33+
34+
See the [example](example/) directory for a complete Flutter app using this package.
35+
36+
From here please follow the documentation of [network_tools](https://pub.dev/packages/network_tools) as they are the same.
3237

3338

3439
## mDNS search

example/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
# Ignore all generated plugin registrant and plugins files across platforms
2+
**/flutter/generated_plugin_registrant.*
3+
**/flutter/generated_plugins.*
4+
**/Flutter/GeneratedPluginRegistrant.*
5+
16
# Miscellaneous
27
*.class
38
*.log
49
*.pyc
510
*.swp
611
.DS_Store
712
.atom/
13+
.build/
814
.buildlog/
915
.history
1016
.svn/
17+
.swiftpm/
1118
migrate_working_dir/
1219

1320
# IntelliJ related
@@ -31,6 +38,7 @@ migrate_working_dir/
3138
.pub-cache/
3239
.pub/
3340
/build/
41+
/pubspec.lock
3442

3543
# Symbolication related
3644
app.*.symbols

example/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# example
2-
3-
A new Flutter project.
1+
samples, guidance on mobile development, and a full API reference.
42

5-
## Getting Started
3+
# Example for network_tools_flutter
64

7-
This project is a starting point for a Flutter application.
5+
This example demonstrates how to use the `network_tools_flutter` package in a Flutter app.
86

9-
A few resources to get you started if this is your first Flutter project:
7+
```dart
8+
import 'package:network_tools_flutter/network_tools_flutter.dart';
9+
import 'package:path_provider/path_provider.dart';
1010
11-
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
11+
Future<void> main() async {
12+
final appDocDirectory = await getApplicationDocumentsDirectory();
13+
await configureNetworkToolsFlutter(appDocDirectory.path, enableDebugging: true);
14+
// Now you can use the network_tools_flutter APIs
15+
}
16+
```
1317

14-
For help getting started with Flutter development, view the
15-
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16-
samples, guidance on mobile development, and a full API reference.
18+
For a complete example, see the code in this directory.

example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ android {
2828
ndkVersion flutter.ndkVersion
2929

3030
compileOptions {
31-
sourceCompatibility JavaVersion.VERSION_1_8
32-
targetCompatibility JavaVersion.VERSION_1_8
31+
sourceCompatibility JavaVersion.VERSION_17
32+
targetCompatibility JavaVersion.VERSION_17
3333
}
3434

3535
kotlinOptions {
36-
jvmTarget = '1.8'
36+
jvmTarget = '17'
3737
}
3838

3939
sourceSets {
@@ -45,7 +45,7 @@ android {
4545
applicationId "org.fsociety.network_tools_flutter_example.example"
4646
// You can update the following values to match your application needs.
4747
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48-
minSdkVersion 21
48+
minSdkVersion flutter.minSdkVersion
4949
targetSdkVersion flutter.targetSdkVersion
5050
versionCode flutterVersionCode.toInteger()
5151
versionName flutterVersionName

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.7.22'
33
repositories {
44
google()
55
mavenCentral()

example/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ pluginManagement {
1717

1818
include ":app"
1919

20-
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
20+

example/linux/flutter/generated_plugin_registrant.cc

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)