Skip to content

TP-10 — Add ThemeDefinition #105

Description

@ZhuchkaTriplesix

Epic: B
Depends on: TP-03

Source: docs/theme-parser-github-issues.md

Goal

Represent lightweight theme metadata for lists/pickers without full parsing.

Files

  • lib/core/theme/theme_definition.dart
  • test/core/theme/theme_definition_test.dart

Implementation

Add:

enum ThemeSource { builtin, imported, filesystem, legacyImported }
enum ThemeFormat { queryaCustom, vscode }

class ThemeDefinition {
  const ThemeDefinition({
    required this.id,
    required this.name,
    required this.source,
    required this.format,
    required this.isDark,
    this.path,
    this.lastModified,
    this.contentHash,
  });
}

Add helpers:

  • bool get isFileBacked
  • String get stableCacheKey

Acceptance Criteria

  • ThemeDefinition is immutable.
  • stableCacheKey changes when contentHash changes.
  • Does not depend on Flutter widgets.

Tests

  • file-backed vs builtin;
  • cache key includes id/hash/source;
  • equality if implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    registryTheme parser epic label: registrythemeTheming, colors, VS Code themes

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions