shlink-manager/lib/API/Classes/ShortURL/device_long_urls.dart

24 lines
696 B
Dart
Raw Normal View History

2024-01-27 23:07:06 +01:00
/// Data about device-specific long URLs for one short URL
class DeviceLongUrls {
/// Custom URL for Android devices
final String? android;
/// Custom URL for iOS devices
final String? ios;
/// Custom URL for desktop
final String? desktop;
DeviceLongUrls(this.android, this.ios, this.desktop);
/// Converts JSON data from the API to an instance of [DeviceLongUrls]
DeviceLongUrls.fromJson(Map<String, dynamic> json)
: android = json["android"],
ios = json["ios"],
desktop = json["desktop"];
/// Converts data from this class to an JSON object of type
Map<String, dynamic> toJson() => {
"android": android,
"ios": ios,
"desktop": desktop
};
}