Online tracking, deviceidentityservice
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
// Immutable adatosztály — az eszköz összes statikus adata.
|
||||
// A DeviceIdentityService tölti be egyszer induláskor.
|
||||
|
||||
class DeviceInfoModel {
|
||||
// ── Azonosítók ────────────────────────────────────────────────────
|
||||
|
||||
/// Android rendszerszintű egyedi azonosító.
|
||||
/// Reinstall után megmarad, factory reset után változik.
|
||||
final String deviceId;
|
||||
|
||||
/// App-példány UUID — FlutterSecureStorage-ban tárolva.
|
||||
/// Reinstall után új értéket kap.
|
||||
final String appInstanceId;
|
||||
|
||||
// ── Hardver ───────────────────────────────────────────────────────
|
||||
|
||||
final String manufacturer; // "Samsung"
|
||||
final String model; // "Galaxy Tab S9 Ultra"
|
||||
final String brand; // "samsung"
|
||||
|
||||
// ── Rendszer ──────────────────────────────────────────────────────
|
||||
|
||||
/// Felhasználó által adott eszköznév (pl. "Pista telefonja").
|
||||
/// A Settings.Global.DEVICE_NAME értéke — ez az alapértelmezett label.
|
||||
final String systemDeviceName;
|
||||
|
||||
final String osVersion; // "14"
|
||||
final int sdkInt; // 34
|
||||
final String securityPatch; // "2024-06-01"
|
||||
|
||||
// ── App ───────────────────────────────────────────────────────────
|
||||
|
||||
final String appVersion; // "1.0.0"
|
||||
final String buildNumber; // "15"
|
||||
|
||||
const DeviceInfoModel({
|
||||
required this.deviceId,
|
||||
required this.appInstanceId,
|
||||
required this.manufacturer,
|
||||
required this.model,
|
||||
required this.brand,
|
||||
required this.systemDeviceName,
|
||||
required this.osVersion,
|
||||
required this.sdkInt,
|
||||
required this.securityPatch,
|
||||
required this.appVersion,
|
||||
required this.buildNumber,
|
||||
});
|
||||
|
||||
// ── Supabase regisztrációs map ────────────────────────────────────
|
||||
|
||||
Map<String, dynamic> toRegistrationMap({required String label}) => {
|
||||
'device_id': deviceId,
|
||||
'app_instance_id': appInstanceId,
|
||||
'label': label,
|
||||
'manufacturer': manufacturer,
|
||||
'model': model,
|
||||
'os_version': osVersion,
|
||||
'sdk_int': sdkInt,
|
||||
'security_patch': securityPatch,
|
||||
'app_version': '$appVersion+$buildNumber',
|
||||
'last_seen': DateTime.now().toIso8601String(),
|
||||
};
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'DeviceInfo($manufacturer $model, Android $osVersion, app $appVersion)';
|
||||
}
|
||||
@@ -173,11 +173,11 @@ class NoteItem {
|
||||
);
|
||||
|
||||
Polygon<int> toPolygon() => Polygon(
|
||||
points: points,
|
||||
color: color.withOpacity(opacity),
|
||||
borderColor: strokeColor,
|
||||
borderStrokeWidth: strokeWidth,
|
||||
label: label.isEmpty ? null : label,
|
||||
hitValue: id!,
|
||||
);
|
||||
points: points,
|
||||
color: color.withOpacity(opacity),
|
||||
borderColor: strokeColor,
|
||||
borderStrokeWidth: strokeWidth,
|
||||
label: label.isEmpty ? null : label,
|
||||
hitValue: id!,
|
||||
labelStyle: TextStyle(fontSize: 10.0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user