import 'package:equatable/equatable.dart'; class PrinterDev extends Equatable { int id; String deviceName; String? address; String? port; String? vendorId; String? productId; bool? isBle; bool? state; PrinterDev( {required this.deviceName, required this.id, this.address, this.port, this.state = true, this.vendorId, this.productId, this.isBle = false}); PrinterDev.fromJson(Map json) : deviceName = json['deviceName'], id = json['id'], address = json['address'], port = json['port'], state = json['state'], vendorId = json['vendorId'], productId = json['productId'], isBle = json['this.isBle']; Map toJson() => { 'deviceName': deviceName, 'address': address, 'port': port, 'state': state, 'vendorId': vendorId, 'productId': productId, 'isBle': isBle, 'id': id }; @override List get props => [deviceName]; }