RenderThemeBuilder class

Builder class for parsing XML theme files and creating RenderTheme instances.

This class handles the parsing of XML-based rendering theme files, converting them into structured RenderTheme objects. It supports theme customization through element exclusion and provides comprehensive error handling during parsing.

Key features:

  • XML theme file parsing and validation
  • Rule hierarchy construction
  • Element exclusion for theme customization
  • Version compatibility checking
  • Comprehensive error reporting

Properties

baseStrokeWidth ↔ double
Base stroke width scaling factor from theme definition.
getter/setter pair
baseTextSize ↔ double
Base text size scaling factor from theme definition.
getter/setter pair
excludeIds → Set<String>
Set of element IDs to exclude from rendering for theme customization.
final
forHash ↔ String
Hash string for theme identification and caching.
getter/setter pair
hasBackgroundOutside ↔ bool?
Whether the theme defines background color for areas outside the map.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
mapBackground ↔ int?
Map background color in ARGB format.
getter/setter pair
mapBackgroundOutside ↔ int?
Background color for areas outside map bounds in ARGB format.
getter/setter pair
ruleBuilderStack → List<RuleBuilder>
Stack of rule builders for hierarchical rule construction.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version ↔ int
Theme file version number.
getter/setter pair

Methods

getNextLevel() → int
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

BASE_STROKE_WIDTH → String
XML attribute for base stroke width scaling factor.
final
BASE_TEXT_SIZE → String
XML attribute for base text size scaling factor.
final
MAP_BACKGROUND → String
XML attribute for map background color.
final
MAP_BACKGROUND_OUTSIDE → String
XML attribute for background color outside map bounds.
final
RENDER_THEME_VERSION → int
Current supported render theme version.
final
VERSION → String
XML attribute for theme version.
final
XMLNS → String
XML namespace declaration.
final
XMLNS_XSI → String
XML Schema Instance namespace declaration.
final
XSI_SCHEMALOCATION → String
XML Schema location attribute.
final

Static Methods

createFromFile(String filename, {Set<String> excludeIds = const {}}) → Future<Rendertheme>
Builds and returns a rendertheme by loading a rendertheme file. This is a convienience-function. If desired we can also implement some caching so that we do not need to parse the same file over and over again.
createFromString(String content, {Set<String> excludeIds = const {}}) → Rendertheme
Creates a RenderTheme from XML content string.