Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
EParisot authored Sep 4, 2023
2 parents b96fc57 + 3dba695 commit e3ea0c5
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 95 deletions.
16 changes: 5 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
## 0.5.0

* Updated gradle build tool chains
* Fixed plugin to use non-deprecated Java function within plugin

## 0.4.0

* Use deviceName (unique and not null) for equal operator and hashCode.

## 0.3.0
Expand Down Expand Up @@ -49,18 +43,18 @@

## 0.1.1

* Merged pull request 1: Fix for NoSuchMethodException thrown on api level less than 21
during device enumeration.
* Merged pull request 1: Fix for NoSuchMethodException thrown on api level less than 21
during device enumeration.

## 0.1.0

* Modified the USB Attached/Detach stream from Stream<String> to Stream<UsbEvent> to
carry additional information about the device being added or removed.
* Modified the USB Attached/Detach stream from Stream<String> to Stream<UsbEvent> to
carry additional information about the device being added or removed.
* Added ACTION_USB_ATTACHED and ACTION_USB_DETACHED constants to dart interface.

## 0.0.2

* Fixed crasher when connected or disconnecting a USB device without having
* Fixed crasher when connected or disconnecting a USB device without having
a sink attached.

## 0.0.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add a dependency to your pubspec.yaml

```dart
dependencies:
usb_serial: ^0.4.0
usb_serial: ^0.3.0
```

include the usbserial package at the top of your dart file.
Expand Down
5 changes: 0 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
linter:
rules:
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- valid_regexps
- always_declare_return_types
- empty_constructor_bodies
Expand All @@ -16,9 +14,6 @@ linter:
- unnecessary_brace_in_string_interps

analyzer:
strong-mode:
implicit-casts: true
implicit-dynamic: true
exclude:
- test/test.dart
- test/echo_port.dart
3 changes: 0 additions & 3 deletions android/.idea/.gitignore

This file was deleted.

4 changes: 1 addition & 3 deletions android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions android/.idea/jarRepositories.xml

This file was deleted.

1 change: 0 additions & 1 deletion build/unit_test_assets/AssetManifest.json

This file was deleted.

1 change: 0 additions & 1 deletion build/unit_test_assets/FontManifest.json

This file was deleted.

Binary file removed build/unit_test_assets/NOTICES.Z
Binary file not shown.
Binary file removed build/unit_test_assets/shaders/ink_sparkle.frag
Binary file not shown.
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 30

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
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-6.7-all.zip
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class _MyAppState extends State<MyApp> {
),
body: Center(
child: Column(children: <Widget>[
Text(_ports.length > 0 ? "Available Serial Ports" : "No serial devices available", style: Theme.of(context).textTheme.headline6),
Text(_ports.length > 0 ? "Available Serial Ports" : "No serial devices available", style: Theme.of(context).textTheme.titleLarge),
..._ports,
Text('Status: $_status\n'),
Text('info: ${_port.toString()}\n'),
Expand All @@ -160,7 +160,7 @@ class _MyAppState extends State<MyApp> {
},
),
),
Text("Result Data", style: Theme.of(context).textTheme.headline6),
Text("Result Data", style: Theme.of(context).textTheme.titleLarge),
..._serialData,
])),
));
Expand Down
44 changes: 9 additions & 35 deletions lib/transformers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ class TerminatedTransformer
/// remain attached in the output.
///
/// This constructor creates a single stream
TerminatedTransformer(
{bool sync = false,
this.cancelOnError,
this.terminator,
this.maxLen = 1024,
this.stripTerminator = true}) {
TerminatedTransformer({bool sync = false, this.cancelOnError, this.terminator, this.maxLen = 1024, this.stripTerminator = true}) {
_partial = [];
_controller = new StreamController<Uint8List>(
onListen: _onListen,
Expand All @@ -90,12 +85,8 @@ class TerminatedTransformer
/// remain attached in the output.
///
/// This constructor creates a broadcast stream
TerminatedTransformer.broadcast(
{bool sync = false,
this.cancelOnError,
this.terminator,
this.maxLen = 1024,
this.stripTerminator = true}) {
TerminatedTransformer.broadcast({bool sync = false, this.cancelOnError, this.terminator, this.maxLen = 1024, this.stripTerminator = true}) {
_partial = [];
_controller = new StreamController<Uint8List>.broadcast(
onListen: _onListen, onCancel: _onCancel, sync: sync);
Expand Down Expand Up @@ -180,12 +171,8 @@ class TerminatedStringTransformer
/// remain attached in the output.
///
/// This constructor creates a single string stream
TerminatedStringTransformer(
{bool sync = false,
this.cancelOnError,
this.terminator,
this.maxLen = 1024,
this.stripTerminator = true}) {
TerminatedStringTransformer({bool sync = false, this.cancelOnError, this.terminator, this.maxLen = 1024, this.stripTerminator = true}) {
_partial = [];
_controller = new StreamController<String>(
onListen: _onListen,
Expand All @@ -210,12 +197,8 @@ class TerminatedStringTransformer
/// remain attached in the output.
///
/// This constructor creates a broadcast string stream
TerminatedStringTransformer.broadcast(
{bool sync = false,
this.cancelOnError,
this.terminator,
this.maxLen = 1024,
this.stripTerminator = true}) {
TerminatedStringTransformer.broadcast({bool sync = false, this.cancelOnError, this.terminator, this.maxLen = 1024, this.stripTerminator = true}) {
_partial = [];
_controller = new StreamController<String>.broadcast(
onListen: _onListen, onCancel: _onCancel, sync: sync);
Expand Down Expand Up @@ -300,12 +283,7 @@ class MagicHeaderAndLengthByteTransformer
StreamSubscription? _subscription;
late Stream<Uint8List> _stream;

MagicHeaderAndLengthByteTransformer(
{bool sync = false,
this.cancelOnError,
this.header,
this.maxLen = 1024,
this.clearTimeout = const Duration(seconds: 1)}) {
MagicHeaderAndLengthByteTransformer({bool sync = false, this.cancelOnError, this.header, this.maxLen = 1024, this.clearTimeout = const Duration(seconds: 1)}) {
_partial = [];
_controller = new StreamController<Uint8List>(
onListen: _onListen,
Expand All @@ -320,11 +298,7 @@ class MagicHeaderAndLengthByteTransformer
}

MagicHeaderAndLengthByteTransformer.broadcast(
{bool sync = false,
this.cancelOnError,
this.header,
this.maxLen = 1024,
this.clearTimeout = const Duration(seconds: 1)}) {
{bool sync = false, this.cancelOnError, this.header, this.maxLen = 1024, this.clearTimeout = const Duration(seconds: 1)}) {
_partial = [];
_controller = new StreamController<Uint8List>.broadcast(
onListen: _onListen, onCancel: _onCancel, sync: sync);
Expand Down
1 change: 0 additions & 1 deletion lib/usb_serial.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:typed_data';

import 'package:collection/collection.dart';
import 'package:flutter/services.dart';
Expand Down

0 comments on commit e3ea0c5

Please sign in to comment.