Add devices screen to the Flutter frontend

Lists devices with New/Registered/All filtering, pull-to-refresh,
device-type icons, and visual differentiation between new and registered
devices. Introduces a reusable StatusBadge widget for colour-coded labels.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-27 14:58:11 -04:00
co-authored by Claude Sonnet 4.6
parent 6d72ba7202
commit d0b9855bad
5 changed files with 280 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
class Device {
final String macAddress;
final String ipv4Address;
final String vendor;
final DateTime lastSeen;
final bool isRegistered;
final String owner;
final String deviceType;
Device({
required this.macAddress,
required this.ipv4Address,
required this.vendor,
required this.lastSeen,
required this.isRegistered,
required this.owner,
required this.deviceType,
});
Device.fromJson(Map<String, dynamic> json)
: macAddress = json['mac_address'] as String,
ipv4Address = json['ipv4_address'] as String,
vendor = json['vendor'] as String,
lastSeen = DateTime.parse(json['last_seen'] as String),
isRegistered = json['is_registered'] as bool,
owner = json['owner'] as String,
deviceType = json['device_type'] as String;
}