Skip to content
Open
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
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion flutter.compileSdkVersion

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.pauldemarco.flutter_blue_example"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class BluetoothOffScreen extends StatelessWidget {
'Bluetooth Adapter is ${state != null ? state.toString().substring(15) : 'not available'}.',
style: Theme.of(context)
.primaryTextTheme
.subhead
.subtitle1
?.copyWith(color: Colors.white),
),
],
Expand Down
10 changes: 5 additions & 5 deletions example/lib/widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ServiceTile extends StatelessWidget {
children: <Widget>[
Text('Service'),
Text('0x${service.uuid.toString().toUpperCase().substring(4, 8)}',
style: Theme.of(context).textTheme.body1?.copyWith(
style: Theme.of(context).textTheme.bodyText2?.copyWith(
color: Theme.of(context).textTheme.caption?.color))
],
),
Expand Down Expand Up @@ -183,7 +183,7 @@ class CharacteristicTile extends StatelessWidget {
Text('Characteristic'),
Text(
'0x${characteristic.uuid.toString().toUpperCase().substring(4, 8)}',
style: Theme.of(context).textTheme.body1?.copyWith(
style: Theme.of(context).textTheme.bodyText2?.copyWith(
color: Theme.of(context).textTheme.caption?.color))
],
),
Expand Down Expand Up @@ -245,7 +245,7 @@ class DescriptorTile extends StatelessWidget {
Text('0x${descriptor.uuid.toString().toUpperCase().substring(4, 8)}',
style: Theme.of(context)
.textTheme
.body1
.bodyText2
?.copyWith(color: Theme.of(context).textTheme.caption?.color))
],
),
Expand Down Expand Up @@ -289,11 +289,11 @@ class AdapterStateTile extends StatelessWidget {
child: ListTile(
title: Text(
'Bluetooth adapter is ${state.toString().substring(15)}',
style: Theme.of(context).primaryTextTheme.subhead,
style: Theme.of(context).primaryTextTheme.subtitle1,
),
trailing: Icon(
Icons.error,
color: Theme.of(context).primaryTextTheme.subhead?.color,
color: Theme.of(context).primaryTextTheme.subtitle1?.color,
),
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/bluetooth_characteristic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BluetoothCharacteristic {
_onValueChangedStream,
]);

List<int> get lastValue => _value.value ?? [];
List<int> get lastValue => _value.value;

BluetoothCharacteristic.fromProto(protos.BluetoothCharacteristic p)
: uuid = new Guid(p.uuid),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/bluetooth_descriptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BluetoothDescriptor {
BehaviorSubject<List<int>> _value;
Stream<List<int>> get value => _value.stream;

List<int> get lastValue => _value.value ?? [];
List<int> get lastValue => _value.value;

BluetoothDescriptor.fromProto(protos.BluetoothDescriptor p)
: uuid = new Guid(p.uuid),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/flutter_blue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class FlutterBlue {
.map((buffer) => new protos.ScanResult.fromBuffer(buffer))
.map((p) {
final result = new ScanResult.fromProto(p);
final list = _scanResults.value ?? [];
final list = _scanResults.value;
int index = list.indexOf(result);
if (index != -1) {
list[index] = result;
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flutter_blue
description:
Flutter plugin for connecting and communicating with Bluetooth Low Energy devices,
on Android and iOS
version: 0.8.0
version: 0.8.1
homepage: https://github.com/pauldemarco/flutter_blue

environment:
Expand All @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
convert: ^3.0.0
protobuf: ^2.0.0
rxdart: ^0.26.0
rxdart: ^0.27.0
collection: ^1.15.0
meta: ^1.3.0

Expand Down