Files
immich/mobile-v2/lib/domain/models/server-info/server_config.model.dart
shenlong-tanwen 877c3b028b fix: handle login
2025-02-26 08:58:19 +05:30

35 lines
858 B
Dart

import 'package:openapi/api.dart';
class ServerConfig {
final String? oauthButtonText;
const ServerConfig({this.oauthButtonText});
ServerConfig copyWith({String? oauthButtonText}) {
return ServerConfig(
oauthButtonText: oauthButtonText ?? this.oauthButtonText,
);
}
factory ServerConfig.fromDto(ServerConfigDto dto) => ServerConfig(
oauthButtonText:
dto.oauthButtonText.isEmpty ? null : dto.oauthButtonText,
);
const ServerConfig.reset() : oauthButtonText = null;
@override
String toString() =>
'ServerConfig(oauthButtonText: ${oauthButtonText ?? '<NULL>'})';
@override
bool operator ==(covariant ServerConfig other) {
if (identical(this, other)) return true;
return other.oauthButtonText == oauthButtonText;
}
@override
int get hashCode => oauthButtonText.hashCode;
}