getModifiedProperties method

  1. @override
Set<String> getModifiedProperties()
override

Get the set of property names that have been modified from defaults.

This is used to track which colors the user has customized, enabling the "pending overrides" indicator in the workbench UI.

Returns a set of string identifiers like 'restBaseColor', 'textSize', etc.

Implementation

@override
Set<String> getModifiedProperties() {
  final modified = <String>{};
  final defaults = getDefaultDimensions();

  // Check dimension modifications
  if (width != defaults.width) modified.add('width');
  if (height != defaults.height) modified.add('height');
  if (paddingH != defaults.paddingH) modified.add('paddingH');
  if (paddingV != defaults.paddingV) modified.add('paddingV');

  // Check neumorphic property modifications
  if (distance != NeumorphicTokens.distanceDefault) modified.add('distance');
  if (blur != NeumorphicTokens.blurDefault) modified.add('blur');
  if (borderRadius != RadiusTokens.md) modified.add('borderRadius');

  // Check animated border modifications
  if (showAnimatedBorder) modified.add('showAnimatedBorder');
  if (borderWidth != 3.0) modified.add('borderWidth');

  // Check state override flags
  if (restOverrideEnabled) modified.add('restOverrideEnabled');
  if (hoverOverrideEnabled) modified.add('hoverOverrideEnabled');
  if (pressedOverrideEnabled) modified.add('pressedOverrideEnabled');
  if (disabledOverrideEnabled) modified.add('disabledOverrideEnabled');

  // Add component-specific modifications
  modified.addAll(getComponentSpecificModifiedProperties());

  return modified;
}