mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
24 lines
539 B
Dart
24 lines
539 B
Dart
import 'package:to_string/to_string.dart';
|
|
|
|
part 'server_status.g.dart';
|
|
|
|
@toString
|
|
class ServerStatus {
|
|
const ServerStatus({
|
|
required this.versionRaw,
|
|
required this.versionName,
|
|
required this.productName,
|
|
});
|
|
|
|
@override
|
|
String toString() => _$toString();
|
|
|
|
final String versionRaw;
|
|
final String versionName;
|
|
final String productName;
|
|
}
|
|
|
|
extension ServerStatusExtension on ServerStatus {
|
|
List<int> get versionNumber => versionRaw.split(".").map(int.parse).toList();
|
|
int get majorVersion => versionNumber[0];
|
|
}
|