Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: flutter --version

- name: Cache pubspec dependencies
uses: actions/cache@v4.1.2
uses: actions/cache@v4.2.4
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
Expand All @@ -51,18 +51,6 @@ jobs:
restore-keys: |
build-pubspec-

- name: Cache build runner
uses: actions/cache@v4.1.2
with:
path: |
**/.dart_tool
**/*.g.dart
**/*.mocks.dart
**/*.config.dart
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }}
restore-keys: |
build-runner-

- name: Download pub dependencies
run: flutter pub get

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
needs: 'test'
permissions:
id-token: write # Required for authentication using OIDC
uses: git-elliot/setup-dart/.github/workflows/publish.yml@main # Added build_runner step
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
with:
environment: 'pub.dev'
build_runner: false
environment: 'pub.dev'
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## 3.0.0
Performance improvements

## 2.0.7
Scan fixed for android

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ And initialize the pacakge in the main function
await configureNetworkToolsFlutter((await getApplicationDocumentsDirectory()).path);
```

From here please follow the documentation of [network_tools](https://pub.dev/packages/network_tools) as they are the same.

## Example

See the [example](example/) directory for a complete Flutter app using this package.

From here please follow the documentation of [network_tools](https://pub.dev/packages/network_tools) as they are the same.


## mDNS search
Expand Down
8 changes: 8 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Ignore all generated plugin registrant and plugins files across platforms
**/flutter/generated_plugin_registrant.*
**/flutter/generated_plugins.*
**/Flutter/GeneratedPluginRegistrant.*

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand All @@ -31,6 +38,7 @@ migrate_working_dir/
.pub-cache/
.pub/
/build/
/pubspec.lock

# Symbolication related
app.*.symbols
Expand Down
24 changes: 13 additions & 11 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# example

A new Flutter project.
samples, guidance on mobile development, and a full API reference.

## Getting Started
# Example for network_tools_flutter

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

A few resources to get you started if this is your first Flutter project:
```dart
import 'package:network_tools_flutter/network_tools_flutter.dart';
import 'package:path_provider/path_provider.dart';

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
Future<void> main() async {
final appDocDirectory = await getApplicationDocumentsDirectory();
await configureNetworkToolsFlutter(appDocDirectory.path, enableDebugging: true);
// Now you can use the network_tools_flutter APIs
}
```

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
For a complete example, see the code in this directory.
8 changes: 4 additions & 4 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ android {
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

sourceSets {
Expand All @@ -45,7 +45,7 @@ android {
applicationId "org.fsociety.network_tools_flutter_example.example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.7.22'
repositories {
google()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ pluginManagement {

include ":app"

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

11 changes: 0 additions & 11 deletions example/linux/flutter/generated_plugin_registrant.cc

This file was deleted.

15 changes: 0 additions & 15 deletions example/linux/flutter/generated_plugin_registrant.h

This file was deleted.

23 changes: 0 additions & 23 deletions example/linux/flutter/generated_plugins.cmake

This file was deleted.

14 changes: 0 additions & 14 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift

This file was deleted.

2 changes: 1 addition & 1 deletion example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.14'
platform :osx, '10.15'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
14 changes: 10 additions & 4 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
PODS:
- FlutterMacOS (1.0.0)
- nsd_macos (0.0.1):
- FlutterMacOS
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- nsd_macos (from `Flutter/ephemeral/.symlinks/plugins/nsd_macos/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)

EXTERNAL SOURCES:
FlutterMacOS:
:path: Flutter/ephemeral
nsd_macos:
:path: Flutter/ephemeral/.symlinks/plugins/nsd_macos/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin

SPEC CHECKSUMS:
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
nsd_macos: a472240e770b92f6c6df1022403aa29c90d012e3
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564

PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3

COCOAPODS: 1.12.0
COCOAPODS: 1.16.2
8 changes: 4 additions & 4 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C80D4294CF70F00263BE5 = {
Expand Down Expand Up @@ -553,7 +553,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -632,7 +632,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -679,7 +679,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
6 changes: 5 additions & 1 deletion example/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
Loading
Loading