toJson method
Implementation
Map<String, dynamic> toJson() {
return {
if (backgroundColor != null) 'backgroundColor': backgroundColor,
if (description != null) 'description': description,
if (dir != null) 'dir': dir,
if (display != null) 'display': display,
if (displayOverrides != null) 'displayOverrides': [...?displayOverrides],
if (fileHandlers != null)
'fileHandlers': fileHandlers!.map((e) => e.toJson()).toList(),
if (icons != null) 'icons': icons!.map((e) => e.toJson()).toList(),
if (id != null) 'id': id,
if (lang != null) 'lang': lang,
if (launchHandler != null) 'launchHandler': launchHandler!.toJson(),
if (name != null) 'name': name,
if (orientation != null) 'orientation': orientation,
if (preferRelatedApplications != null)
'preferRelatedApplications': preferRelatedApplications,
if (protocolHandlers != null)
'protocolHandlers': protocolHandlers!.map((e) => e.toJson()).toList(),
if (relatedApplications != null)
'relatedApplications':
relatedApplications!.map((e) => e.toJson()).toList(),
if (scope != null) 'scope': scope,
if (scopeExtensions != null)
'scopeExtensions': scopeExtensions!.map((e) => e.toJson()).toList(),
if (screenshots != null)
'screenshots': screenshots!.map((e) => e.toJson()).toList(),
if (shareTarget != null) 'shareTarget': shareTarget!.toJson(),
if (shortName != null) 'shortName': shortName,
if (shortcuts != null)
'shortcuts': shortcuts!.map((e) => e.toJson()).toList(),
if (startUrl != null) 'startUrl': startUrl,
if (themeColor != null) 'themeColor': themeColor,
};
}