import 'package:flutter/material.dart'; import 'package:json_annotation/json_annotation.dart'; part 'userdata.g.dart'; @JsonSerializable() class UserData { UserData( {required this.userId, required this.username, required this.displayName, required this.subscriptionPlan}); String username; String displayName; String? avatarSvg; String? avatarJson; int? avatarCounter; // settings int? defaultShowTime; @JsonKey(defaultValue: "Preview") String subscriptionPlan; bool? useHighQuality; List? preSelectedEmojies; ThemeMode? themeMode; Map>? autoDownloadOptions; bool? storeMediaFilesInGallery; List? lastUsedEditorEmojis; String? lastPlanBallance; String? additionalUserInvites; DateTime? lastImageSend; int? todaysImageCounter; int? myBestFriendContactId; DateTime? signalLastSignedPreKeyUpdated; final int userId; factory UserData.fromJson(Map json) => _$UserDataFromJson(json); Map toJson() => _$UserDataToJson(this); }