toWebTraits method
Converts traits to a format suitable for web platforms.
This method flattens the extras map into the main traits map for web compatibility. Returns a Map<String, dynamic> containing all traits formatted for web.
Implementation
Map<String, dynamic> toWebTraits() {
Map<String, dynamic> webTraits = Map.from(__traitsMap);
dynamic extras = webTraits.remove("extras");
if (extras != null) {
webTraits.addAll(extras);
}
return webTraits;
}