toJson method
- ValueSerializer? serializer,
override
Converts this object into a representation that can be encoded with
json
. The serializer
can be used to configure how individual values
will be encoded. By default, DriftRuntimeOptions.defaultSerializer will
be used. See ValueSerializer.defaults for details.
Implementation
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'userId': serializer.toJson<String?>(userId),
'enablePopups': serializer.toJson<bool?>(enablePopups),
'locale': serializer.toJson<String?>(locale),
'showIntroduction': serializer.toJson<bool?>(showIntroduction),
'sideBarWidth': serializer.toJson<double?>(sideBarWidth),
'callButtons': serializer.toJson<String>(callButtons),
'pinnedActions': serializer.toJson<String>(pinnedActions),
'callButtonsPosition': serializer.toJson<String?>(callButtonsPosition),
'workWithUsTabEnabled': serializer.toJson<bool?>(workWithUsTabEnabled),
'videoDevice': serializer.toJson<String?>(videoDevice),
'audioDevice': serializer.toJson<String?>(audioDevice),
'outputDevice': serializer.toJson<String?>(outputDevice),
'screenDevice': serializer.toJson<String?>(screenDevice),
'muteKeys': serializer.toJson<String?>(muteKeys),
};
}