resolvedTheme property

DebugPanelTheme get resolvedTheme

Get the resolved theme.

Implementation

DebugPanelTheme get resolvedTheme {
  if (theme != null) {
    // Apply custom colors if provided
    if (backgroundColor != null || accentColor != null) {
      return theme!.copyWith(
        backgroundColor: backgroundColor ?? theme!.backgroundColor,
        accentColor: accentColor ?? theme!.accentColor,
      );
    }
    return theme!;
  }

  final baseTheme = DebugPanelTheme.fromScheme(colorScheme);
  if (backgroundColor != null || accentColor != null) {
    return baseTheme.copyWith(
      backgroundColor: backgroundColor,
      accentColor: accentColor,
    );
  }
  return baseTheme;
}