getOptString method

String? getOptString(
  1. String key
)

Getting the nullable values from the map based on different data types

Implementation

String? getOptString(String key) => this[key] != null ? this[key] as String : null;