getGrandchildString method

  1. @useResult
String? getGrandchildString(
  1. String childKey,
  2. String grandChildKey
)

Returns the nested value at childKeygrandChildKey as a String, or null if either key is missing or the value is not a String.

Implementation

@useResult
String? getGrandchildString(String childKey, String grandChildKey) {
  final dynamic value = getGrandchild(childKey, grandChildKey);

  return value is String ? value : null;
}