parsePlaceholderMetadata method

List<Placeholder> parsePlaceholderMetadata(
  1. Map<String, dynamic> placeholders
)

Implementation

List<Placeholder> parsePlaceholderMetadata(
  Map<String, dynamic> placeholders,
) {
  final placeholderTypes = <Placeholder>[];
  for (var entry in placeholders.entries) {
    final placeholderName = entry.key;
    final placeholderData = entry.value as Map<String, dynamic>;
    final type = (placeholderData['type'] as String?) ?? 'String';
    placeholderTypes.add(Placeholder(placeholderName, type));
  }
  return placeholderTypes;
}