Skip to content

Commit

Permalink
new default constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
MohiuddinM authored Mar 11, 2019
1 parent e87ef98 commit 15fbb81
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 @@ -80,13 +80,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 15fbb81

Please sign in to comment.