toMapOfStringStringN static method

Map<String, String>? toMapOfStringStringN(
  1. dynamic d
)

Converts a dynamic value to a nullable map of <String, String>.

d - The dynamic value to be converted. Returns a map of <String, String> if the conversion is successful, otherwise null.

Implementation

static Map<String, String>? toMapOfStringStringN(dynamic d) {
  final jsonMap = Convert.toMapN<String, dynamic>(d);
  return jsonMap != null
      ? jsonMap.map((key, value) => MapEntry(key, value.toString()))
      : null;
}