VSCodeEditorTheme<C, Y>.fromJson constructor

VSCodeEditorTheme<C, Y>.fromJson(
  1. Map<String, dynamic> json, {
  2. required C? parseColor(
    1. String?
    ),
  3. required String? colorToString(
    1. C?
    ),
  4. required Y defaultTextStyle,
})

Implementation

VSCodeEditorTheme.fromJson(
  Map<String, dynamic> json, {
  required this.parseColor,
  required this.colorToString,
  required super.defaultTextStyle,
}) : super(
        checkboxBorder: parseColor(json['checkbox.border']),
        editorBackground: parseColor(json['editor.background']),
        editorForeground: parseColor(json['editor.foreground']),
        editorInactiveSelectionBackgroundAndTerminalInactiveSelectionBackground:
            parseColor(json['editor.inactiveSelectionBackground'] ??
                json['terminal.inactiveSelectionBackground']),
        editorIndentGuideBackground1:
            parseColor(json['editorIndentGuide.background1']),
        editorIndentGuideActiveBackground1:
            parseColor(json['editorIndentGuide.activeBackground1']),
        editorSelectionHighlightBackground:
            parseColor(json['editor.selectionHighlightBackground']),
        listDropBackground: parseColor(json['list.dropBackground']),
        activityBarBadgeBackground:
            parseColor(json['activityBarBadge.background']),
        sideBarTitleForeground: parseColor(json['sideBarTitle.foreground']),
        inputPlaceholderForeground:
            parseColor(json['input.placeholderForeground']),
        menuBackground: parseColor(json['menu.background']),
        menuForeground: parseColor(json['menu.foreground']),
        menuSeparatorAndBorderBackground: parseColor(
            json['menu.separatorBackground'] ?? json['menu.border']),
        menuSelectionBackground: parseColor(json['menu.selectionBackground']),
        statusBarItemRemoteForeground:
            parseColor(json['statusBarItem.remoteForeground']),
        statusBarItemRemoteBackground:
            parseColor(json['statusBarItem.remoteBackground']),
        portsIconRunningProcessForeground:
            parseColor(json['ports.iconRunningProcessForeground']),
        sideBarSectionHeaderBackground:
            parseColor(json['sideBarSectionHeader.background']),
        sideBarSectionHeaderBorder:
            parseColor(json['sideBarSectionHeader.border']),
        tabSelectedBackground: parseColor(json['tab.selectedBackground']),
        tabSelectedForeground: parseColor(json['tab.selectedForeground']),
        tabLastPinnedBorder: parseColor(json['tab.lastPinnedBorder']),
        listActiveSelectionIconForeground:
            parseColor(json['list.activeSelectionIconForeground']),
        widgetBorder: parseColor(json['widget.border']),
        actionBarToggledBackground:
            parseColor(json['actionBar.toggledBackground']),
        activityBarActiveBorder: parseColor(json['activityBar.activeBorder']),
        activityBarBackground: parseColor(json['activityBar.background']),
        activityBarBorder: parseColor(json['activityBar.border']),
        activityBarForeground: parseColor(json['activityBar.foreground']),
        activityBarInactiveForeground:
            parseColor(json['activityBar.inactiveForeground']),
        activityBarBadgeForeground:
            parseColor(json['activityBarBadge.foreground']),
        badgeBackground: parseColor(json['badge.background']),
        badgeForeground: parseColor(json['badge.foreground']),
        buttonBackground: parseColor(json['button.background']),
        buttonBorder: parseColor(json['button.border']),
        buttonForeground: parseColor(json['button.foreground']),
        buttonHoverBackground: parseColor(json['button.hoverBackground']),
        buttonSecondaryBackground:
            parseColor(json['button.secondaryBackground']),
        buttonSecondaryForeground:
            parseColor(json['button.secondaryForeground']),
        buttonSecondaryHoverBackground:
            parseColor(json['button.secondaryHoverBackground']),
        chatSlashCommandBackground:
            parseColor(json['chat.slashCommandBackground']),
        chatSlashCommandForeground:
            parseColor(json['chat.slashCommandForeground']),
        chatEditedFileForeground:
            parseColor(json['chat.editedFileForeground']),
        checkboxBackground: parseColor(json['checkbox.background']),
        debugToolBarBackground: parseColor(json['debugToolBar.background']),
        descriptionForeground: parseColor(json['descriptionForeground']),
        dropdownBackground: parseColor(json['dropdown.background']),
        dropdownBorder: parseColor(json['dropdown.border']),
        dropdownForeground: parseColor(json['dropdown.foreground']),
        dropdownListBackground: parseColor(json['dropdown.listBackground']),
        editorFindMatchBackground:
            parseColor(json['editor.findMatchBackground']),
        editorGroupBorder: parseColor(json['editorGroup.border']),
        editorGroupHeaderTabsBackground:
            parseColor(json['editorGroupHeader.tabsBackground']),
        editorGroupHeaderTabsBorder:
            parseColor(json['editorGroupHeader.tabsBorder']),
        editorGutterAddedBackground:
            parseColor(json['editorGutter.addedBackground']),
        editorGutterDeletedBackground:
            parseColor(json['editorGutter.deletedBackground']),
        editorGutterModifiedBackground:
            parseColor(json['editorGutter.modifiedBackground']),
        editorLineNumberActiveForeground:
            parseColor(json['editorLineNumber.activeForeground']),
        editorLineNumberForeground:
            parseColor(json['editorLineNumber.foreground']),
        editorOverviewRulerBorder:
            parseColor(json['editorOverviewRuler.border']),
        editorWidgetBackground: parseColor(json['editorWidget.background']),
        errorForeground: parseColor(json['errorForeground']),
        focusBorder: parseColor(json['focusBorder']),
        foreground: parseColor(json['foreground']),
        iconForeground: parseColor(json['icon.foreground']),
        inputBackground: parseColor(json['input.background']),
        inputBorder: parseColor(json['input.border']),
        inputForeground: parseColor(json['input.foreground']),
        inputOptionActiveBackground:
            parseColor(json['inputOption.activeBackground']),
        inputOptionActiveBorder: parseColor(json['inputOption.activeBorder']),
        keybindingLabelForeground:
            parseColor(json['keybindingLabel.foreground']),
        notificationCenterHeaderBackground:
            parseColor(json['notificationCenterHeader.background']),
        notificationCenterHeaderForeground:
            parseColor(json['notificationCenterHeader.foreground']),
        notificationsBackground: parseColor(json['notifications.background']),
        notificationsBorder: parseColor(json['notifications.border']),
        notificationsForeground: parseColor(json['notifications.foreground']),
        panelBackground: parseColor(json['panel.background']),
        panelBorder: parseColor(json['panel.border']),
        panelInputBorder: parseColor(json['panelInput.border']),
        panelTitleActiveBorder: parseColor(json['panelTitle.activeBorder']),
        panelTitleActiveForeground:
            parseColor(json['panelTitle.activeForeground']),
        panelTitleInactiveForeground:
            parseColor(json['panelTitle.inactiveForeground']),
        peekViewEditorBackground:
            parseColor(json['peekViewEditor.background']),
        peekViewEditorMatchHighlightBackground:
            parseColor(json['peekViewEditor.matchHighlightBackground']),
        peekViewResultBackground:
            parseColor(json['peekViewResult.background']),
        peekViewResultMatchHighlightBackground:
            parseColor(json['peekViewResult.matchHighlightBackground']),
        pickerGroupBorder: parseColor(json['pickerGroup.border']),
        progressBarBackground: parseColor(json['progressBar.background']),
        quickInputBackground: parseColor(json['quickInput.background']),
        quickInputForeground: parseColor(json['quickInput.foreground']),
        settingsDropdownBackground:
            parseColor(json['settings.dropdownBackground']),
        settingsDropdownBorder: parseColor(json['settings.dropdownBorder']),
        settingsHeaderForeground:
            parseColor(json['settings.headerForeground']),
        settingsModifiedItemIndicator:
            parseColor(json['settings.modifiedItemIndicator']),
        sideBarBackground: parseColor(json['sideBar.background']),
        sideBarBorder: parseColor(json['sideBar.border']),
        sideBarForeground: parseColor(json['sideBar.foreground']),
        sideBarSectionHeaderForeground:
            parseColor(json['sideBarSectionHeader.foreground']),
        statusBarBackground: parseColor(json['statusBar.background']),
        statusBarBorder: parseColor(json['statusBar.border']),
        statusBarDebuggingBackground:
            parseColor(json['statusBar.debuggingBackground']),
        statusBarDebuggingForeground:
            parseColor(json['statusBar.debuggingForeground']),
        statusBarFocusBorder: parseColor(json['statusBar.focusBorder']),
        statusBarForeground: parseColor(json['statusBar.foreground']),
        statusBarNoFolderBackground:
            parseColor(json['statusBar.noFolderBackground']),
        statusBarItemFocusBorder:
            parseColor(json['statusBarItem.focusBorder']),
        statusBarItemProminentBackground:
            parseColor(json['statusBarItem.prominentBackground']),
        tabActiveBackground: parseColor(json['tab.activeBackground']),
        tabActiveBorder: parseColor(json['tab.activeBorder']),
        tabActiveBorderTop: parseColor(json['tab.activeBorderTop']),
        tabActiveForeground: parseColor(json['tab.activeForeground']),
        tabSelectedBorderTop: parseColor(json['tab.selectedBorderTop']),
        tabBorder: parseColor(json['tab.border']),
        tabHoverBackground: parseColor(json['tab.hoverBackground']),
        tabInactiveBackground: parseColor(json['tab.inactiveBackground']),
        tabInactiveForeground: parseColor(json['tab.inactiveForeground']),
        tabUnfocusedActiveBorder:
            parseColor(json['tab.unfocusedActiveBorder']),
        tabUnfocusedActiveBorderTop:
            parseColor(json['tab.unfocusedActiveBorderTop']),
        tabUnfocusedHoverBackground:
            parseColor(json['tab.unfocusedHoverBackground']),
        terminalForeground: parseColor(json['terminal.foreground']),
        terminalTabActiveBorder:
            parseColor(json['terminal.tab.activeBorder']),
        textBlockQuoteBackground:
            parseColor(json['textBlockQuote.background']),
        textBlockQuoteBorder: parseColor(json['textBlockQuote.border']),
        textCodeBlockBackground: parseColor(json['textCodeBlock.background']),
        textLinkActiveForeground:
            parseColor(json['textLink.activeForeground']),
        textLinkForeground: parseColor(json['textLink.foreground']),
        textPreformatForeground: parseColor(json['textPreformat.foreground']),
        textPreformatBackground: parseColor(json['textPreformat.background']),
        textSeparatorForeground: parseColor(json['textSeparator.foreground']),
        titleBarActiveBackground:
            parseColor(json['titleBar.activeBackground']),
        titleBarActiveForeground:
            parseColor(json['titleBar.activeForeground']),
        titleBarBorder: parseColor(json['titleBar.border']),
        titleBarInactiveBackground:
            parseColor(json['titleBar.inactiveBackground']),
        titleBarInactiveForeground:
            parseColor(json['titleBar.inactiveForeground']),
        welcomePageTileBackground:
            parseColor(json['welcomePage.tileBackground']),
        welcomePageProgressForeground:
            parseColor(json['welcomePage.progress.foreground']),
      );