Skip to content

Commit

Permalink
Merge pull request #21 from MohiuddinM/master
Browse files Browse the repository at this point in the history
New default constructor.
  • Loading branch information
edufolly authored Mar 18, 2019
2 parents d68ff76 + 15fbb81 commit da2d618
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/flutter_bluetooth_serial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ class FlutterBluetoothSerial {
class BluetoothDevice {
final String name;
final String address;
final int type;
final int type = 0;
bool connected = false;

BluetoothDevice(this.name, this.address);

BluetoothDevice.fromMap(Map map)
: name = map['name'],
address = map['address'],
type = map['type'];
address = map['address'];

Map<String, dynamic> toMap() => {
'name': this.name,
Expand Down

0 comments on commit da2d618

Please sign in to comment.