getGreatGrandchildString method

  1. @useResult
String? getGreatGrandchildString({
  1. required String childKey,
  2. required String grandChildKey,
  3. required String greatGrandChildKey,
})

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

Implementation

@useResult
String? getGreatGrandchildString({
  required String childKey,
  required String grandChildKey,
  required String greatGrandChildKey,
}) {
  final dynamic value = getGreatGrandchild(
    childKey: childKey,
    grandChildKey: grandChildKey,
    greatGrandChildKey: greatGrandChildKey,
  );

  return value is String ? value : null;
}