getJson method

Map<String, dynamic>? getJson(
  1. Feature feature
)

Retrieves and decodes a JSON string from the provided Feature object, returning the decoded Map<String, dynamic> or null if the string is empty or null.

The feature parameter specifies the feature for which the double value is to be retrieved.

Returns the decoded Map<String, dynamic> if the JSON string is not empty or null; otherwise, returns null.

Implementation

Map<String, dynamic>? getJson(Feature feature) {
  final value = getString(feature);
  if (value == null || value.isEmpty) {
    return null;
  }
  final decodedMap = jsonDecode(value) as Map<String, dynamic>;
  return decodedMap;
}