feat: Allow calculating fingerprints

This commit is contained in:
2022-08-08 14:26:25 +02:00
parent 70ab74b8dc
commit dd96e840d4
7 changed files with 86 additions and 8 deletions

View File

@@ -0,0 +1,19 @@
import 'package:meta/meta.dart';
@immutable
class DeviceFingerprint {
const DeviceFingerprint(this.deviceId, this.fingerprint);
final String fingerprint;
final int deviceId;
@override
bool operator ==(Object other) {
return other is DeviceFingerprint &&
fingerprint == other.fingerprint &&
deviceId == other.deviceId;
}
@override
int get hashCode => fingerprint.hashCode ^ deviceId.hashCode;
}