import 'package:equatable/equatable.dart'; import 'package:timezone/timezone.dart'; class ServerTimezone extends Equatable { final Location timezone; const ServerTimezone({required this.timezone}); factory ServerTimezone.fromJson(Map json) { var timezone = getLocation(json['timezone']); return ServerTimezone(timezone: timezone); } Map toJson() => {'timezone': timezone.name}; @override List get props => [timezone.name]; }